FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReactiveChangeSet

    struct · ferroui-reactiveui · v0.5.0

    struct ReactiveChangeSet<T>
    

    A batch of changes of a collection (ReactiveChangeSet<T>), with its counts of additions and removals.

    The batch is shared and immutable: a clone is the same batch, as passing the reference of upstream's class is, so a stream hands every observer the same batch.

    Deviation (DEVIATIONS.md, ReactiveUI): the streams of change sets carry this type, where upstream's carry the interface IReactiveChangeSet<T>, which this type implements (IReactiveChangeSetOf).

    View source

    Members

    new

    fn new(changes: Vec<ReactiveChange<T>>) -> Self
    

    A batch of changes (ReactiveChangeSet(List<ReactiveChange<T>>)).

    Source

    count

    fn count(self: &Self) -> usize
    

    The number of changes (Count).

    Source

    adds

    fn adds(self: &Self) -> usize
    

    The number of additions (Adds).

    Source

    removes

    fn removes(self: &Self) -> usize
    

    The number of removals (Removes).

    Source

    get

    fn get(self: &Self, index: usize) -> Option<&ReactiveChange<T>>
    

    The change at index; None past the end.

    Source

    iter

    fn iter(self: &Self) -> std::slice::Iter<'_, ReactiveChange<T>>
    

    The changes, in order (GetEnumerator).

    Source

    ptr_eq

    fn ptr_eq(self: &Self, other: &Self) -> bool
    

    Whether self and other are the same batch.

    Source

    Trait implementations

    Availability

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