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).
Members
new
fn new(changes: Vec<ReactiveChange<T>>) -> Self
A batch of changes (ReactiveChangeSet(List<ReactiveChange<T>>)).
count
fn count(self: &Self) -> usize
The number of changes (Count).
adds
fn adds(self: &Self) -> usize
The number of additions (Adds).
removes
fn removes(self: &Self) -> usize
The number of removals (Removes).
get
fn get(self: &Self, index: usize) -> Option<&ReactiveChange<T>>
The change at index; None past the end.
iter
fn iter(self: &Self) -> std::slice::Iter<'_, ReactiveChange<T>>
The changes, in order (GetEnumerator).
ptr_eq
fn ptr_eq(self: &Self, other: &Self) -> bool
Whether self and other are the same batch.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeChangeSetCountMixinsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDebugIndex<usize>IntoIteratorIReactiveChangeSetIReactiveChangeSetOf<T>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.