FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ObservableSequencesEx

    trait · ferroui-dynamic-data · v0.5.0

    trait ObservableSequencesEx<T: Clone + 'static>
    

    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.

    View source

    Members

    to_observable_change_set_many

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

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

    Source

    to_observable_change_set_many_with

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

    to_observable_change_set_many with the expiration, the limit of size and the scheduler.

    Source

    to_observable_change_set_cache_many

    fn to_observable_change_set_cache_many<K: Eq + Hash + Clone + 'static>(self: &Self, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<crate::cache::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

    to_observable_change_set_cache_many_with

    fn to_observable_change_set_cache_many_with<K: Eq + Hash + Clone + 'static>(self: &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<crate::cache::ChangeSet<T, K>>>
    

    to_observable_change_set_cache_many with the expiration, the limit of size and the scheduler.

    Source

    edit_diff

    fn edit_diff<K: Eq + Hash + Clone + 'static>(self: &Self, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<crate::cache::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

    edit_diff_with_comparer

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

    edit_diff with the equality of equality_comparer.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.