Skip to main content

SwitchCacheEx

Trait SwitchCacheEx 

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

    // Required method
    fn switch_cache(
        &self,
    ) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>;
}
Expand description

Switch of a sequence of caches or of sequences of change sets.

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 switch_cache(&self) -> Rc<dyn IObservable<ChangeSet<Self::Item, Self::Key>>>

The change sets of the latest source: each new source removes the items of the previous one, then delivers its own; the result completes when the sequence and the latest source have completed, and an error of either ends it (Switch(IObservable<IObservableCache>), Switch(IObservable<IObservable<IChangeSet>>)).

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> SwitchCacheEx for Rc<dyn IObservable<S>>

Implementors§