FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    reason

    fn reason(self: &Self) -> ReactiveChangeReason
    

    Why the change happened (Reason).

    Source

    current

    fn current(self: &Self) -> &T
    

    The item added, replacing, moved or refreshed (Current).

    Source

    previous

    fn previous(self: &Self) -> Option<&T>
    

    The replaced item of a Replace (Previous).

    Source

    current_index

    fn current_index(self: &Self) -> i32
    

    The index of the item, or -1 when it is not known (CurrentIndex).

    Source

    previous_index

    fn previous_index(self: &Self) -> i32
    

    The former index of a Move, or -1 (PreviousIndex).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Hash

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.