ReactiveChange
struct · ferroui-reactiveui · v0.5.0
struct ReactiveChange<T>
One change of a collection (ReactiveChange<T>): the reason, the item, and where they apply
the previous item and the indexes.
The indexes are -1 when they are not known, as in NotifyCollectionChangedEventArgs.
Members
new
fn new(reason: ReactiveChangeReason, current: T, previous: Option<T>, current_index: i32, previous_index: i32) -> Self
A change (ReactiveChange(ReactiveChangeReason, T, T?, int, int)): previous is the
replaced item of a Replace, and previous_index the
former index of a Move.
reason
fn reason(self: &Self) -> ReactiveChangeReason
Why the change happened (Reason).
current
fn current(self: &Self) -> &T
The item added, replacing, moved or refreshed (Current).
previous
fn previous(self: &Self) -> Option<&T>
The replaced item of a Replace (Previous).
current_index
fn current_index(self: &Self) -> i32
The index of the item, or -1 when it is not known (CurrentIndex).
previous_index
fn previous_index(self: &Self) -> i32
The former index of a Move, or -1 (PreviousIndex).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDebugStructuralPartialEqPartialEqEqHash
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.