Skip to main content

CacheSourcesCombineEx

Trait CacheSourcesCombineEx 

Source
pub trait CacheSourcesCombineEx {
    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 a collection of sources (And(this ICollection<IObservable<IChangeSet<TObject, TKey>>>), ..): the sources are subscribed in order when the result is subscribed.

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 (And(ICollection<..>)).

Source

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

The items that are in any source (Or(ICollection<..>)).

Source

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

The items that are in exactly one source (Xor(ICollection<..>)).

Source

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

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<S: CacheChangeSetSource> CacheSourcesCombineEx for [S]

Source§

type Item = <S as CacheChangeSetSource>::Item

Source§

type Key = <S as CacheChangeSetSource>::Key

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§