Skip to main content

IGroup

Trait IGroup 

Source
pub trait IGroup<T, K, G> {
    // Required methods
    fn key(&self) -> &G;
    fn cache(&self) -> Rc<dyn IObservableCache<T, K>>;
}
Expand description

A group of the items of a cache that share a group key, with the cache of those items (IGroup<TObject, TKey, TGroupKey>): the items of the change sets of Group, GroupOnObservable and GroupOnProperty.

Deviation (DEVIATIONS.md, DynamicData): the change sets of groups hold the concrete Group, which implements this trait, rather than the interface: a change set holds its items by value.

Required Methods§

Source

fn key(&self) -> &G

The group key (Key, of IKey<TGroupKey>).

Source

fn cache(&self) -> Rc<dyn IObservableCache<T, K>>

The items of the group, as a cache that can be observed (Cache).

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, G> IGroup<T, K, G> for Group<T, K, G>