SourceListEx
trait · ferroui-dynamic-data · v0.5.0
trait SourceListEx<T: Clone + PartialEq + 'static>: IObservableList<T>
The operators of lists (SourceListEx, and the extension methods of ObservableListEx on
IObservableList and ISourceList).
Members
cast_listdefer_until_loadedexpire_afterexpire_after_onexpire_after_with_pollingexpire_after_with_polling_onlimit_size_tolimit_size_to_on
cast_list
fn cast_list<U: Clone + 'static>(self: &Self, conversion_factory: impl Fn(&T) -> U + 'static) -> Rc<dyn ferroui_system::IObservable<ChangeSet<U>>>
where Self: ISourceList<T>
The items and their changes, each item converted by conversion_factory
(Cast(ISourceList<TSource>, Func<TSource, TDestination>)).
defer_until_loaded
fn defer_until_loaded(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items and their changes from the first change set (DeferUntilLoaded(IObservableList)).
expire_after
fn expire_after(self: &Self, time_selector: impl Fn(&T) -> Option<std::time::Duration> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
where Self: crate::list::ISourceList<T> + Clone + Sized + 'static
Removes each item from the list once the time that time_selector gives for it has
passed (None: never), timed on the default scheduler; the removed items
(ExpireAfter(ISourceList, Func<T, TimeSpan?>, TimeSpan? = null, IScheduler? = null)).
expire_after_on
fn expire_after_on(self: &Self, time_selector: impl Fn(&T) -> Option<std::time::Duration> + 'static, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
where Self: crate::list::ISourceList<T> + Clone + Sized + 'static
expire_after on scheduler.
expire_after_with_polling
fn expire_after_with_polling(self: &Self, time_selector: impl Fn(&T) -> Option<std::time::Duration> + 'static, polling_interval: Option<std::time::Duration>) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
where Self: crate::list::ISourceList<T> + Clone + Sized + 'static
expire_after that removes the expired items every
polling_interval rather than at their times.
expire_after_with_polling_on
fn expire_after_with_polling_on(self: &Self, time_selector: impl Fn(&T) -> Option<std::time::Duration> + 'static, polling_interval: Option<std::time::Duration>, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
where Self: crate::list::ISourceList<T> + Clone + Sized + 'static
expire_after_with_polling on scheduler.
limit_size_to
fn limit_size_to(self: &Self, size_limit: usize) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
where Self: crate::list::ISourceList<T> + Clone + Sized + 'static
Removes the oldest items of the list beyond size_limit, on the default scheduler; the
removed items (LimitSizeTo(ISourceList, int, IScheduler? = null)).
Panics
For a size of zero (ArgumentException).
limit_size_to_on
fn limit_size_to_on(self: &Self, size_limit: usize, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
where Self: crate::list::ISourceList<T> + Clone + Sized + 'static
limit_size_to on scheduler.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.