Skip to main content

ObservableItemsEx

Trait ObservableItemsEx 

Source
pub trait ObservableItemsEx<T: Clone + 'static> {
    // Required method
    fn item_sequence(&self) -> Rc<dyn IObservable<T>>;

    // Provided methods
    fn to_observable_change_set(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
       where T: PartialEq { ... }
    fn to_observable_change_set_with(
        &self,
        expire_after: Option<ExpireAfterSelector<T>>,
        limit_size_to: Option<usize>,
        scheduler: Option<Rc<dyn IScheduler>>,
    ) -> Rc<dyn IObservable<ChangeSet<T>>>
       where T: PartialEq { ... }
    fn to_observable_change_set_cache<K: Eq + Hash + Clone + 'static>(
        &self,
        key_selector: impl Fn(&T) -> K + 'static,
    ) -> Rc<dyn IObservable<ChangeSet<T, K>>> { ... }
    fn to_observable_change_set_cache_with<K: Eq + Hash + Clone + 'static>(
        &self,
        key_selector: impl Fn(&T) -> K + 'static,
        expire_after: Option<ExpireAfterSelector<T>>,
        limit_size_to: Option<usize>,
        scheduler: Option<Rc<dyn IScheduler>>,
    ) -> Rc<dyn IObservable<ChangeSet<T, K>>> { ... }
}
Expand description

The operators of sequences of items (ToObservableChangeSet(IObservable<T>, ..)), implemented for Rc<dyn IObservable<T>>.

Required Methods§

Source

fn item_sequence(&self) -> Rc<dyn IObservable<T>>

The sequence as the handle the operators take.

Provided Methods§

Source

fn to_observable_change_set(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
where T: PartialEq,

The items as additions to a list (ToObservableChangeSet<T>(IObservable<T>, IScheduler? = null)): the first change set comes at the subscription, empty if need be.

Source

fn to_observable_change_set_with( &self, expire_after: Option<ExpireAfterSelector<T>>, limit_size_to: Option<usize>, scheduler: Option<Rc<dyn IScheduler>>, ) -> Rc<dyn IObservable<ChangeSet<T>>>
where T: PartialEq,

to_observable_change_set, whose items expire after the time that expire_after gives and whose oldest beyond limit_size_to are removed, timed on scheduler (ToObservableChangeSet<T>(IObservable<T>, Func<T, TimeSpan?>?, int, IScheduler?) and the shorter overloads).

Source

fn to_observable_change_set_cache<K: Eq + Hash + Clone + 'static>( &self, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>

The items as additions or updates of a cache, keyed by key_selector (ToObservableChangeSet<TObject, TKey>(IObservable<TObject>, Func<TObject, TKey>, ..)).

Source

fn to_observable_change_set_cache_with<K: Eq + Hash + Clone + 'static>( &self, key_selector: impl Fn(&T) -> K + 'static, expire_after: Option<ExpireAfterSelector<T>>, limit_size_to: Option<usize>, scheduler: Option<Rc<dyn IScheduler>>, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>

to_observable_change_set_cache with the expiration, the limit of size and the scheduler (ToObservableChangeSet(IObservable<TObject>, Func<TObject, TKey>, Func<TObject, TimeSpan?>? = null, int limitSizeTo = -1, IScheduler? = null)).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Clone + 'static> ObservableItemsEx<T> for Rc<dyn IObservable<T>>

Source§

fn item_sequence(&self) -> Rc<dyn IObservable<T>>

Implementors§