IntermediateCache
struct · ferroui-dynamic-data · v0.5.0
struct IntermediateCache<T, K>
A cache without a key selector, whose edits give the keys (IntermediateCache<TObject, TKey>): the cache of the operators that keep items under keys of their own. A clone is a
handle to the same cache.
Members
new
fn new() -> Self
An empty cache (IntermediateCache()).
from_source
fn from_source<C: IChangeSet<T, K>>(source: Rc<dyn IObservable<C>>) -> Self
A cache that applies the change sets of source (IntermediateCache(IObservable<IChangeSet>)).
edit
fn edit(self: &Self, update: impl FnOnce(&mut dyn ICacheUpdater<T, K>) -> ())
Runs an edit (Edit(Action<ICacheUpdater>)).
suspend_count
fn suspend_count(self: &Self) -> Rc<dyn IDisposable>
Holds back the notifications of count changes until the result is disposed (SuspendCount).
suspend_notifications
fn suspend_notifications(self: &Self) -> Rc<dyn IDisposable>
Holds back the notifications of changes until the result is disposed
(SuspendNotifications).
add_or_update
fn add_or_update(self: &Self, item: T, key: K)
Adds item under key, or replaces the item of key (AddOrUpdate(IIntermediateCache, TObject, TKey)).
clear
fn clear(self: &Self)
Removes every item (Clear(IIntermediateCache)).
remove_key
fn remove_key(self: &Self, key: K)
Removes the item of key (Remove(IIntermediateCache, TKey)).
remove_keys
fn remove_keys(self: &Self, keys: impl IntoIterator<Item = K>)
Removes the items of keys (Remove(IIntermediateCache, IEnumerable<TKey>)).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeSourceCacheEx<T, K>Borrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDefaultIConnectableCache<T, K>IObservableCache<T, K>IIntermediateCache<T, K>IDisposable
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.