Skip to main content

CacheSourceListCombineEx

Trait CacheSourceListCombineEx 

Source
pub trait CacheSourceListCombineEx {
    type Item: Clone + 'static;
    type Key: Eq + Hash + Clone + 'static;

    // Required methods
    fn and_cache(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
       where Self::Item: Deref;
    fn or(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
       where Self::Item: Deref;
    fn xor(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
       where Self::Item: Deref;
    fn except(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
       where Self::Item: Deref;
}
Expand description

And, Or, Xor and Except of an observable list of sources (And(this IObservableList<IObservable<IChangeSet<TObject, TKey>>>), And(this IObservableList<IObservableCache<TObject, TKey>>), And(this IObservableList<ISourceCache<TObject, TKey>>), ..): the result follows the sources as they are added to the list and removed from it.

Required Associated Types§

Source

type Item: Clone + 'static

The type of the items.

Source

type Key: Eq + Hash + Clone + 'static

The type of the keys.

Required Methods§

Source

fn and_cache(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
where Self::Item: Deref,

The items that are in every source of the list; none while the list is empty (And(IObservableList<..>)).

Source

fn or(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
where Self::Item: Deref,

The items that are in any source of the list (Or(IObservableList<..>)).

Source

fn xor(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
where Self::Item: Deref,

The items that are in exactly one source of the list (Xor(IObservableList<..>)).

Source

fn except(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>
where Self::Item: Deref,

The items of the first source of the list that are in none of the others (Except(IObservableList<..>)).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§