Skip to main content

ObservableSequencesEx

Trait ObservableSequencesEx 

Source
pub trait ObservableSequencesEx<T: Clone + 'static> {
    // Required methods
    fn to_observable_change_set_many(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
       where T: PartialEq;
    fn to_observable_change_set_many_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_many<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_many_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>>>;
    fn edit_diff<K: Eq + Hash + Clone + 'static>(
        &self,
        key_selector: impl Fn(&T) -> K + 'static,
    ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
       where T: PartialEq;
    fn edit_diff_with_comparer<K: Eq + Hash + Clone + 'static>(
        &self,
        key_selector: impl Fn(&T) -> K + 'static,
        equality_comparer: impl Fn(&T, &T) -> bool + 'static,
    ) -> Rc<dyn IObservable<ChangeSet<T, K>>>;
}
Expand description

The operators of sequences of collections of items (ToObservableChangeSet(IObservable< IEnumerable<T>>, ..) and EditDiff(IObservable<IEnumerable<TObject>>, ..)), implemented for Rc<dyn IObservable<I>> of every collection I.

Required Methods§

Source

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

The items of each collection as additions to a list (ToObservableChangeSet<T>( IObservable<IEnumerable<T>>, IScheduler? = null)).

Source

fn to_observable_change_set_many_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_many with the expiration, the limit of size and the scheduler.

Source

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

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

Source

fn to_observable_change_set_cache_many_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_many with the expiration, the limit of size and the scheduler.

Source

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

The changes of a cache, keyed by key_selector, that holds the latest collection: each collection edits it by difference, items compared by PartialEq; the cache ends with the sequence (EditDiff(IObservable<IEnumerable<TObject>>, Func<TObject, TKey>, IEqualityComparer? = null)).

Source

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

edit_diff with the equality of equality_comparer.

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, I: IntoIterator<Item = T> + 'static> ObservableSequencesEx<T> for Rc<dyn IObservable<I>>

Source§

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

Source§

fn to_observable_change_set_many_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,

Source§

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

Source§

fn to_observable_change_set_cache_many_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>>>

Source§

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

Source§

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

Implementors§