IConnectableCache
trait · ferroui-dynamic-data · v0.5.0
trait IConnectableCache<T, K>
A cache that can be observed (IConnectableCache<TObject, TKey>).
Members
count_changed
fn count_changed(self: &Self) -> Rc<dyn IObservable<usize>>
The number of items, now and whenever it changes (CountChanged).
connect_with
fn connect_with(self: &Self, predicate: Option<Rc<dyn Fn(&T) -> bool>>, suppress_empty_change_sets: bool) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The items as additions, then the changes, of the items that predicate accepts; empty
change sets are left out unless suppress_empty_change_sets is false (Connect).
preview_with
fn preview_with(self: &Self, predicate: Option<Rc<dyn Fn(&T) -> bool>>) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The changes before they are applied, while the items are as they were (Preview).
watch
fn watch(self: &Self, key: K) -> Rc<dyn IObservable<Change<T, K>>>
The changes of the item of key (Watch).
connect
fn connect(self: &Self) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The items and their changes (Connect()).
connect_filtered
fn connect_filtered(self: &Self, predicate: impl Fn(&T) -> bool + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
where Self: Sized
The items that predicate accepts and their changes (Connect(Func<TObject, bool>)).
preview
fn preview(self: &Self) -> Rc<dyn IObservable<ChangeSet<T, K>>>
The changes before they are applied (Preview()).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.