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§
Sourcefn key_selector(&self) -> KeySelector<T, K>
fn key_selector(&self) -> KeySelector<T, K>
The key selector of the items (KeySelector).
Sourcefn edit(&self, update: &mut dyn FnMut(&mut dyn ISourceUpdater<T, K>))
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.
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".