Skip to main content

ISourceCache

Trait ISourceCache 

Source
pub trait ISourceCache<T, K>: IObservableCache<T, K> {
    // Required methods
    fn key_selector(&self) -> KeySelector<T, K>;
    fn edit(&self, update: &mut dyn FnMut(&mut dyn ISourceUpdater<T, K>));
}
Expand description

A cache whose items are edited by its owner (ISourceCache<TObject, TKey>).

Required Methods§

Source

fn key_selector(&self) -> KeySelector<T, K>

The key selector of the items (KeySelector).

Source

fn edit(&self, update: &mut dyn FnMut(&mut dyn ISourceUpdater<T, K>))

Runs an edit; its changes are delivered as one change set when it ends (Edit).

Trait Implementations§

Source§

impl<T, K> PartialEq for dyn ISourceCache<T, K>

Caches compare by identity (reference equality), so that they can be the items of a list.

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static> ISourceCache<T, K> for SourceCache<T, K>