ObservableItemsEx
trait · ferroui-dynamic-data · v0.5.0
trait ObservableItemsEx<T: Clone + 'static>
The operators of sequences of items (ToObservableChangeSet(IObservable<T>, ..)), implemented
for Rc<dyn IObservable<T>>.
Members
item_sequenceto_observable_change_setto_observable_change_set_withto_observable_change_set_cacheto_observable_change_set_cache_with
item_sequence
fn item_sequence(self: &Self) -> Rc<dyn IObservable<T>>
The sequence as the handle the operators take.
to_observable_change_set
fn to_observable_change_set(self: &Self) -> Rc<dyn IObservable<crate::list::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.
to_observable_change_set_with
fn to_observable_change_set_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, 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).
to_observable_change_set_cache
fn to_observable_change_set_cache<K: Eq + Hash + Clone + 'static>(self: &Self, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<crate::cache::ChangeSet<T, K>>>
The items as additions or updates of a cache, keyed by key_selector
(ToObservableChangeSet<TObject, TKey>(IObservable<TObject>, Func<TObject, TKey>, ..)).
to_observable_change_set_cache_with
fn to_observable_change_set_cache_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 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)).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.