FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Self
    

    An empty cache (IntermediateCache()).

    Source

    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>)).

    Source

    edit

    fn edit(self: &Self, update: impl FnOnce(&mut dyn ICacheUpdater<T, K>) -> ())
    

    Runs an edit (Edit(Action<ICacheUpdater>)).

    Source

    suspend_count

    fn suspend_count(self: &Self) -> Rc<dyn IDisposable>
    

    Holds back the notifications of count changes until the result is disposed (SuspendCount).

    Source

    suspend_notifications

    fn suspend_notifications(self: &Self) -> Rc<dyn IDisposable>
    

    Holds back the notifications of changes until the result is disposed (SuspendNotifications).

    Source

    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)).

    Source

    clear

    fn clear(self: &Self)
    

    Removes every item (Clear(IIntermediateCache)).

    Source

    remove_key

    fn remove_key(self: &Self, key: K)
    

    Removes the item of key (Remove(IIntermediateCache, TKey)).

    Source

    remove_keys

    fn remove_keys(self: &Self, keys: impl IntoIterator<Item = K>)
    

    Removes the items of keys (Remove(IIntermediateCache, IEnumerable<TKey>)).

    Source

    Trait implementations

    Availability

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