ChangeSetBinder
struct · ferroui-reactiveui · v0.5.0
struct ChangeSetBinder<T>
Applies a stream of change sets to a list that it keeps (ChangeSetBinder<T>): the light
replacement of DynamicData's SourceList bind that the list adapters of the platforms use. It
subscribes once, applies each change in order, tells the adapter of each change and of each
batch, so that the adapter raises its own notifications, and unsubscribes when disposed.
Deviation (DEVIATIONS.md, ReactiveUI): upstream's class is internal to the platform assemblies; it is public here for the integration of the user interface, which lives in its own crate.
Members
new
fn new(source: Rc<dyn IObservable<ReactiveChangeSet<T>>>, on_change: Option<ReactiveChangeHandler<T>>, on_batch: Option<Rc<dyn Fn() -> ()>>) -> Self
A binder of source (ChangeSetBinder(IObservable<IReactiveChangeSet<T>>, ReactiveChangeHandler<T>?, Action?)): on_change is told of each change as it is applied,
and on_batch once after each change set.
count
fn count(self: &Self) -> usize
The number of items (Count).
get
fn get(self: &Self, index: usize) -> T
The item at index (the indexer).
Panics
When index is out of range (ArgumentOutOfRangeException).
to_vec
fn to_vec(self: &Self) -> Vec<T>
A copy of the items.
dispose
fn dispose(self: &Self)
Unsubscribes from the change sets (Dispose).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyIDisposable
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.