ObservableListEx
trait · ferroui-dynamic-data · v0.5.0
trait ObservableListEx<T: Clone + PartialEq + 'static>
The operators of lists (ObservableListEx).
Members
change_setsand_listexceptortransform_asynctransform_async_withtransform_async_with_indextransform_async_with_previoustransform_async_with_previous_and_indextransform_async_with_tokenxorfilterfilter_dynamicfilter_dynamic_withfilter_with_statefilter_with_state_withadaptauto_refreshauto_refresh_withauto_refresh_anyauto_refresh_any_withauto_refresh_on_observableauto_refresh_on_observable_withbindbind_with_thresholdbind_with_optionsbind_read_onlybind_read_only_with_thresholdbind_read_only_with_optionsbind_to_observable_listbuffer_ifbuffer_if_onbuffer_if_with_initialbuffer_if_with_initial_onbuffer_if_with_time_outbuffer_if_with_time_out_onbuffer_if_with_initial_and_time_outbuffer_if_with_initial_and_time_out_onbuffer_initialbuffer_initial_oncast_listcast_to_objectclone_toconvertdefer_until_loadeddispose_manydispose_many_withdistinct_valuesfilter_on_observablefilter_on_observable_withfilter_on_propertyfilter_on_property_withfor_each_changefor_each_item_changegroup_ongroup_on_withgroup_on_propertygroup_on_property_withgroup_on_property_with_ongroup_on_property_with_immutable_stategroup_on_property_with_immutable_state_withgroup_on_property_with_immutable_state_with_ongroup_with_immutable_stategroup_with_immutable_state_withmerge_change_setsmerge_change_sets_withmerge_change_sets_manymerge_change_sets_many_withmerge_manymerge_many_change_setsmerge_many_change_sets_with_comparermerge_many_cache_change_setsmerge_many_cache_change_sets_with_comparermerge_many_cache_change_sets_ordered_bymerge_many_cache_change_sets_withon_item_addedon_item_refreshedon_item_removedon_item_removed_withpagepopulate_intoquery_when_changedquery_when_changed_withref_countremove_indexreverseskip_initialsortsort_withsort_on_observablesort_on_observable_withstart_with_emptysubscribe_manysuppress_refreshto_collectionto_sorted_collectionto_sorted_collection_with_comparertoptransformtransform_withtransform_with_indextransform_with_previoustransform_with_previous_and_indextry_transformtry_transform_with_previous_and_indextransform_manytransform_many_with_comparertransform_many_observable_listtransform_many_observable_list_with_comparertransform_many_observable_collectiontransform_many_observable_collection_with_comparervirtualisewhen_any_property_changedwhen_property_changedwhen_property_changed_withwhen_value_changedwhen_value_changed_withwhere_reasons_arewhere_reasons_are_notadd_keyas_observable_listcollect_update_statsnot_empty
change_sets
fn change_sets(self: &Self) -> Rc<dyn IObservable<ChangeSet<T>>>
The sequence as plain change sets.
and_list
fn and_list(self: &Self, others: Vec<std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: Eq + std::hash::Hash
The sequence combined with others: the items that are in every one of them
(And(IObservable<IChangeSet<T>>, params IObservable<IChangeSet<T>>[])).
The sequences are subscribed in order when the result is subscribed; a sequence given
twice is combined once (Union). An item is in a list as many times as it was added,
and counts by equality and hash.
Panics
When others is empty
(ArgumentException: "Must be at least one item to combine with").
except
fn except(self: &Self, others: Vec<std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: Eq + std::hash::Hash
The items of the sequence that are in none of others
(Except(IObservable<IChangeSet<T>>, params IObservable<IChangeSet<T>>[])).
The sequences are subscribed in order when the result is subscribed; a sequence given
twice is combined once (Union). An item is in a list as many times as it was added,
and counts by equality and hash.
Panics
When others is empty
(ArgumentException: "Must be at least one item to combine with").
or
fn or(self: &Self, others: Vec<std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: Eq + std::hash::Hash
The sequence combined with others: the items that are in any of them
(Or(IObservable<IChangeSet<T>>, params IObservable<IChangeSet<T>>[])).
The sequences are subscribed in order when the result is subscribed; a sequence given
twice is combined once (Union). An item is in a list as many times as it was added,
and counts by equality and hash.
Panics
When others is empty
(ArgumentException: "Must be at least one item to combine with").
transform_async
fn transform_async<U: Clone + PartialEq + 'static, Fut: std::future::Future<Output = Result<U, ferroui_system::ObservableError>> + 'static>(self: &Self, transform_factory: impl Fn(T) -> Fut + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
Each item in the form the future of transform_factory gives it, at the same position:
an addition or a replacement awaits the factory, a refresh is forwarded, and removals and
moves apply to the transformed items
(TransformAsync(Func<TSource, Task<TDestination>>, bool transformOnRefresh = false)).
transform_async_with
fn transform_async_with<U: Clone + PartialEq + 'static, Fut: std::future::Future<Output = Result<U, ferroui_system::ObservableError>> + 'static>(self: &Self, transform_factory: impl Fn(T) -> Fut + 'static, transform_on_refresh: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_async that, when transform_on_refresh is true,
transforms a refreshed item again and emits a replacement
(TransformAsync(Func<TSource, Task<TDestination>>, bool transformOnRefresh)).
transform_async_with_index
fn transform_async_with_index<U: Clone + PartialEq + 'static, Fut: std::future::Future<Output = Result<U, ferroui_system::ObservableError>> + 'static>(self: &Self, transform_factory: impl Fn(T, usize) -> Fut + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_async with a factory of the item and its index
(TransformAsync(Func<TSource, int, Task<TDestination>>, bool transformOnRefresh = false)).
transform_async_with_previous
fn transform_async_with_previous<U: Clone + PartialEq + 'static, Fut: std::future::Future<Output = Result<U, ferroui_system::ObservableError>> + 'static>(self: &Self, transform_factory: impl Fn(T, Option<U>) -> Fut + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_async with a factory of the item and the value it
had (for a replacement, or a refresh that transforms)
(TransformAsync(Func<TSource, Optional<TDestination>, Task<TDestination>>, bool transformOnRefresh = false)).
transform_async_with_previous_and_index
fn transform_async_with_previous_and_index<U: Clone + PartialEq + 'static, Fut: std::future::Future<Output = Result<U, ferroui_system::ObservableError>> + 'static>(self: &Self, transform_factory: impl Fn(T, Option<U>, usize) -> Fut + 'static, transform_on_refresh: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_async with a factory of the item, the value it had
and its index, and the flag of transform_async_with
(TransformAsync(Func<TSource, Optional<TDestination>, int, Task<TDestination>>, bool transformOnRefresh)).
transform_async_with_token
fn transform_async_with_token<U: Clone + PartialEq + 'static, Fut: std::future::Future<Output = Result<U, ferroui_system::ObservableError>> + 'static>(self: &Self, transform_factory: impl Fn(T, Option<U>, usize, ferroui_system::threading::CancellationToken) -> Fut + 'static, transform_on_refresh: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_async_with_previous_and_index
whose factory also takes the token that the disposal of the subscription cancels
(TransformAsync(Func<TSource, Optional<TDestination>, int, CancellationToken, Task<TDestination>>, bool transformOnRefresh)).
xor
fn xor(self: &Self, others: Vec<std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: Eq + std::hash::Hash
The sequence combined with others: the items that are in exactly one of them
(Xor(IObservable<IChangeSet<T>>, params IObservable<IChangeSet<T>>[])).
The sequences are subscribed in order when the result is subscribed; a sequence given
twice is combined once (Union). An item is in a list as many times as it was added,
and counts by equality and hash.
Panics
When others is empty
(ArgumentException: "Must be at least one item to combine with").
filter
fn filter(self: &Self, predicate: impl Fn(&T) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items that predicate accepts, in the order of the source; a refresh or a
replacement evaluates the item again (Filter(Func<T, bool>)).
filter_dynamic
fn filter_dynamic(self: &Self, predicate: std::rc::Rc<dyn ferroui_system::IObservable<std::rc::Rc<dyn Fn(&T) -> bool>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items that the latest predicate of predicate accepts; until the first, none is. A
new predicate removes the items that no longer match and adds those that now do
(Filter(IObservable<Func<T, bool>>, ListFilterPolicy filterPolicy = CalculateDiff)).
filter_dynamic_with
fn filter_dynamic_with(self: &Self, predicate: std::rc::Rc<dyn ferroui_system::IObservable<std::rc::Rc<dyn Fn(&T) -> bool>>>, filter_policy: crate::list::ListFilterPolicy) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
filter_dynamic with the policy of a new predicate
(Filter(IObservable<Func<T, bool>>, ListFilterPolicy)).
filter_with_state
fn filter_with_state<S: 'static>(self: &Self, predicate_state: std::rc::Rc<dyn ferroui_system::IObservable<S>>, predicate: impl Fn(&S, &T) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items that predicate accepts with the latest value of predicate_state, in the
order of the source; until the first value, none is
(Filter<T, TState>(IObservable<TState>, Func<TState, T, bool>, ListFilterPolicy = CalculateDiff, bool suppressEmptyChangeSets = true)).
filter_with_state_with
fn filter_with_state_with<S: 'static>(self: &Self, predicate_state: std::rc::Rc<dyn ferroui_system::IObservable<S>>, predicate: impl Fn(&S, &T) -> bool + 'static, filter_policy: crate::list::ListFilterPolicy, suppress_empty_change_sets: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
filter_with_state with the policy of a new state, keeping
the empty change sets when suppress_empty_change_sets is false
(Filter<T, TState>(IObservable<TState>, Func<TState, T, bool>, ListFilterPolicy, bool)).
adapt
fn adapt(self: &Self, adaptor: std::rc::Rc<dyn crate::list::IChangeSetAdaptor<T>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Hands each change set to adaptor as it passes (Adapt(IChangeSetAdaptor<T>)).
auto_refresh
fn auto_refresh<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_accessor: P) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where <P as >::Value: 'static
The changes, with a refresh of an item whenever the property of property_accessor
changes on it, so that the operators downstream evaluate it again
(AutoRefresh(Expression<Func<TObject, TProperty>>)).
The path observes its own steps, so the items need not be INotifyPropertyChanged
themselves (upstream's constraint TObject : INotifyPropertyChanged).
auto_refresh_with
fn auto_refresh_with<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_accessor: P, change_set_buffer: Option<std::time::Duration>, property_change_throttle: Option<std::time::Duration>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where <P as >::Value: 'static
auto_refresh that gathers the refreshes of each
change_set_buffer into one change set and throttles the changes of the property of
each item by property_change_throttle, on scheduler
(AutoRefresh(Expression<Func<TObject, TProperty>>, TimeSpan? changeSetBuffer, TimeSpan? propertyChangeThrottle, IScheduler? scheduler)).
auto_refresh_any
fn auto_refresh_any(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: crate::binding::NotifyPropertyChangedEx
The changes, with a refresh of an item whenever any of its properties changes
(AutoRefresh(); the overloads of upstream share the name AutoRefresh).
auto_refresh_any_with
fn auto_refresh_any_with(self: &Self, change_set_buffer: Option<std::time::Duration>, property_change_throttle: Option<std::time::Duration>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: crate::binding::NotifyPropertyChangedEx
auto_refresh_any that gathers the refreshes of each
change_set_buffer into one change set and throttles the changes of the properties of
each item by property_change_throttle, on scheduler
(AutoRefresh(TimeSpan? changeSetBuffer, TimeSpan? propertyChangeThrottle, IScheduler? scheduler)).
auto_refresh_on_observable
fn auto_refresh_on_observable<A: 'static>(self: &Self, reevaluator: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<A>> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The changes, with a refresh of an item whenever the sequence reevaluator makes for it
produces a value, so that the operators downstream evaluate it again
(AutoRefreshOnObservable(Func<TObject, IObservable<TAny>>)).
auto_refresh_on_observable_with
fn auto_refresh_on_observable_with<A: 'static>(self: &Self, reevaluator: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<A>> + 'static, change_set_buffer: Option<std::time::Duration>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
auto_refresh_on_observable that gathers the
refreshes of each change_set_buffer into one change set, on scheduler
(AutoRefreshOnObservable(Func<TObject, IObservable<TAny>>, TimeSpan? changeSetBuffer, IScheduler? scheduler)).
bind
fn bind<C: crate::binding::IObservableCollection<T> + Clone + 'static>(self: &Self, target_collection: &C) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Applies the change sets to target_collection with the default options
(Bind(IObservableCollection<T>, int resetThreshold = 25)).
bind_with_threshold
fn bind_with_threshold<C: crate::binding::IObservableCollection<T> + Clone + 'static>(self: &Self, target_collection: &C, reset_threshold: usize) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
bind with a threshold of changes above which the collection is loaded
again with a reset (Bind(IObservableCollection<T>, int resetThreshold)).
bind_with_options
fn bind_with_options<C: crate::binding::IObservableCollection<T> + Clone + 'static>(self: &Self, target_collection: &C, options: crate::binding::BindingOptions) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
bind with options (Bind(IObservableCollection<T>, BindingOptions)).
bind_read_only
fn bind_read_only(self: &Self) -> (std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>, crate::binding::ReadOnlyObservableCollection<T>)
Applies the change sets to a new collection, returned as a read-only view
(Bind(out ReadOnlyObservableCollection<T>, int resetThreshold = 25)).
bind_read_only_with_threshold
fn bind_read_only_with_threshold(self: &Self, reset_threshold: usize) -> (std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>, crate::binding::ReadOnlyObservableCollection<T>)
bind_read_only with a threshold
(Bind(out ReadOnlyObservableCollection<T>, int resetThreshold)).
bind_read_only_with_options
fn bind_read_only_with_options(self: &Self, options: crate::binding::BindingOptions) -> (std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>, crate::binding::ReadOnlyObservableCollection<T>)
bind_read_only with options
(Bind(out ReadOnlyObservableCollection<T>, BindingOptions)).
bind_to_observable_list
fn bind_to_observable_list(self: &Self) -> (std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>, std::rc::Rc<dyn crate::list::IObservableList<T>>)
Fills a new observable list with the change sets as they pass; the list is disposed
when the sequence ends (BindToObservableList(out IObservableList<TObject>)).
buffer_if
fn buffer_if(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets, held back while pause_if_true_selector last gave true and delivered
as one when it gives false; the signals are observed on the default scheduler
(BufferIf(IObservable<bool>, IScheduler? = null)).
buffer_if_on
fn buffer_if_on(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if on scheduler.
buffer_if_with_initial
fn buffer_if_with_initial(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, initial_pause_state: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if, paused from the start when initial_pause_state is true
(BufferIf(IObservable<bool>, bool, IScheduler? = null)).
buffer_if_with_initial_on
fn buffer_if_with_initial_on(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, initial_pause_state: bool, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if_with_initial on scheduler.
buffer_if_with_time_out
fn buffer_if_with_time_out(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, time_out: Option<std::time::Duration>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if whose pause ends by itself after time_out
(BufferIf(IObservable<bool>, TimeSpan?, IScheduler? = null)).
buffer_if_with_time_out_on
fn buffer_if_with_time_out_on(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, time_out: Option<std::time::Duration>, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if_with_time_out on scheduler.
buffer_if_with_initial_and_time_out
fn buffer_if_with_initial_and_time_out(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, initial_pause_state: bool, time_out: Option<std::time::Duration>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if_with_time_out, paused from the start when
initial_pause_state is true (BufferIf(IObservable<bool>, bool, TimeSpan?, IScheduler? = null)).
buffer_if_with_initial_and_time_out_on
fn buffer_if_with_initial_and_time_out_on(self: &Self, pause_if_true_selector: std::rc::Rc<dyn ferroui_system::IObservable<bool>>, initial_pause_state: bool, time_out: Option<std::time::Duration>, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_if_with_initial_and_time_out on
scheduler.
buffer_initial
fn buffer_initial(self: &Self, initial_buffer: std::time::Duration) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets of the first initial_buffer after the first one, as one change set,
then the change sets as they come (BufferInitial(TimeSpan, IScheduler? = null), on the
default scheduler).
buffer_initial_on
fn buffer_initial_on(self: &Self, initial_buffer: std::time::Duration, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
buffer_initial on scheduler.
cast_list
fn cast_list<U: Clone + 'static>(self: &Self, conversion_factory: impl Fn(&T) -> U + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
The change sets with each item converted by conversion_factory
(Cast(Func<TSource, TDestination>); named cast_list beside ObservableExt::cast).
cast_to_object
fn cast_to_object(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<std::rc::Rc<dyn std::any::Any>>>>
The change sets with each item as an object (CastToObject): a Rc<dyn Any> that holds
the item, which cast_list_any
casts back.
clone_to
fn clone_to<L: crate::list::IList<T> + 'static>(self: &Self, target: std::rc::Rc<std::cell::RefCell<L>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets, applied to target as they pass (Clone(IList<T>); named clone_to
beside Clone::clone).
convert
fn convert<U: Clone + 'static>(self: &Self, conversion_factory: impl Fn(&T) -> U + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
The change sets with each item converted by conversion_factory
(Convert(Func<TObject, TDestination>)).
defer_until_loaded
fn defer_until_loaded(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets from the first one; empty change sets are left out
(DeferUntilLoaded(IObservable<IChangeSet<T>>)).
dispose_many
fn dispose_many(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where T: crate::AsDisposable
Disposes each item when it is removed or replaced, and every item left when the sequence
ends or the subscription ends; the change sets are forwarded first (DisposeMany).
The items are disposables through AsDisposable; an item for
which it gives None is left alone.
dispose_many_with
fn dispose_many_with(self: &Self, to_disposable: impl Fn(&T) -> Option<std::rc::Rc<dyn ferroui_system::IDisposable>> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
dispose_many for items that to_disposable makes disposables of
(item as IDisposable).
distinct_values
fn distinct_values<V: Eq + std::hash::Hash + Clone + 'static>(self: &Self, value_selector: impl Fn(&T) -> V + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<V>>>
The distinct values that value_selector gives for the items, as the changes of a list
(DistinctValues(Func<TObject, TValue>)).
filter_on_observable
fn filter_on_observable(self: &Self, object_filter_observable: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<bool>> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items whose sequence of object_filter_observable produced true last; an item is
included until its sequence produces false
(FilterOnObservable(Func<TObject, IObservable<bool>>)).
filter_on_observable_with
fn filter_on_observable_with(self: &Self, object_filter_observable: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<bool>> + 'static, property_changed_throttle: Option<std::time::Duration>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
filter_on_observable that gathers the changes of the
filters of each property_changed_throttle into one change set, on scheduler
(FilterOnObservable(Func<TObject, IObservable<bool>>, TimeSpan? propertyChangedThrottle, IScheduler? scheduler)).
filter_on_property
fn filter_on_property<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_selector: P, predicate: impl Fn(&T) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where <P as >::Value: 'static
The items that predicate accepts, evaluated again whenever the property of
property_selector changes on an item (FilterOnProperty(Expression<Func<TObject, TProperty>>, Func<TObject, bool>):
AutoRefresh(propertySelector) followed by Filter(predicate)).
filter_on_property_with
fn filter_on_property_with<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_selector: P, predicate: impl Fn(&T) -> bool + 'static, property_changed_throttle: Option<std::time::Duration>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
where <P as >::Value: 'static
filter_on_property that throttles the changes of the
property of each item by property_changed_throttle, on scheduler
(FilterOnProperty(.., TimeSpan? propertyChangedThrottle, IScheduler? scheduler)).
for_each_change
fn for_each_change(self: &Self, action: impl Fn(&crate::list::Change<T>) -> () + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Runs action for each change, before the change set is forwarded
(ForEachChange(Action<Change<TObject>>)).
for_each_item_change
fn for_each_item_change(self: &Self, action: impl Fn(&crate::list::ItemChange<T>) -> () + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Runs action for the change of each item, the ranges spread into the changes of their
items, before the change set is forwarded (ForEachItemChange(Action<ItemChange<TObject>>)).
group_on
fn group_on<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, group_selector: impl Fn(&T) -> G + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::Group<T, G>>>>
The items grouped by the key group_selector selects: a change set of groups, each with
the list of its items (GroupOn(Func<TObject, TGroup>, IObservable<Unit>? regrouper = null)).
group_on_with
fn group_on_with<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, group_selector: impl Fn(&T) -> G + 'static, regrouper: std::rc::Rc<dyn ferroui_system::IObservable<()>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::Group<T, G>>>>
group_on that evaluates the group of every item again when
regrouper produces a value (GroupOn(Func<TObject, TGroup>, IObservable<Unit>)).
group_on_property
fn group_on_property<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, property_selector: ferroui_system::component_model::PropertyPath<T, G>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::Group<T, G>>>>
The items grouped by the value of the property property_selector, which is evaluated
again when the property changes on an item (GroupOnProperty(Expression<Func<TObject, TGroup>>)).
group_on_property_with
fn group_on_property_with<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, property_selector: ferroui_system::component_model::PropertyPath<T, G>, property_changed_throttle: std::time::Duration) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::Group<T, G>>>>
group_on_property that evaluates the groups once the
property has not changed for property_changed_throttle, timed on the default scheduler
(GroupOnProperty(Expression, TimeSpan?)).
group_on_property_with_on
fn group_on_property_with_on<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, property_selector: ferroui_system::component_model::PropertyPath<T, G>, property_changed_throttle: std::time::Duration, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::Group<T, G>>>>
group_on_property_with timed on scheduler
(GroupOnProperty(Expression, TimeSpan?, IScheduler?)).
group_on_property_with_immutable_state
fn group_on_property_with_immutable_state<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, property_selector: ferroui_system::component_model::PropertyPath<T, G>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::ImmutableGroup<T, G>>>>
The states of the groups of the items by the value of the property property_selector,
which is evaluated again when the property changes on an item
(GroupOnPropertyWithImmutableState(Expression<Func<TObject, TGroup>>)).
group_on_property_with_immutable_state_with
fn group_on_property_with_immutable_state_with<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, property_selector: ferroui_system::component_model::PropertyPath<T, G>, property_changed_throttle: std::time::Duration) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::ImmutableGroup<T, G>>>>
group_on_property_with_immutable_state
that evaluates the groups once the property has not changed for
property_changed_throttle, timed on the default scheduler
(GroupOnPropertyWithImmutableState(Expression, TimeSpan?)).
group_on_property_with_immutable_state_with_on
fn group_on_property_with_immutable_state_with_on<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, property_selector: ferroui_system::component_model::PropertyPath<T, G>, property_changed_throttle: std::time::Duration, scheduler: std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::ImmutableGroup<T, G>>>>
group_on_property_with_immutable_state_with
timed on scheduler (GroupOnPropertyWithImmutableState(Expression, TimeSpan?, IScheduler?)).
group_with_immutable_state
fn group_with_immutable_state<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, group_selector_key: impl Fn(&T) -> G + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::ImmutableGroup<T, G>>>>
The items grouped by the key group_selector_key selects, as states of the groups that
do not change: a group whose items change is replaced with its new state
(GroupWithImmutableState(Func<TObject, TGroupKey>, IObservable<Unit>? regrouper = null)).
group_with_immutable_state_with
fn group_with_immutable_state_with<G: Eq + std::hash::Hash + Clone + 'static>(self: &Self, group_selector_key: impl Fn(&T) -> G + 'static, regrouper: std::rc::Rc<dyn ferroui_system::IObservable<()>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<crate::list::ImmutableGroup<T, G>>>>
group_with_immutable_state that evaluates the group
of every item again when regrouper produces a value
(GroupWithImmutableState(Func<TObject, TGroupKey>, IObservable<Unit>)).
merge_change_sets
fn merge_change_sets(self: &Self, other: std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets of the sequence and of other, merged; it completes when both have
completed (MergeChangeSets(IObservable<IChangeSet<TObject>>, IObservable<IChangeSet< TObject>>, IEqualityComparer<TObject>? = null, IScheduler? = null, bool completable = true)).
merge_change_sets_with
fn merge_change_sets_with(self: &Self, other: std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>, equality_comparer: Option<std::rc::Rc<dyn Fn(&T, &T) -> bool>>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>, completable: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
merge_change_sets with every argument: the equality of the
items (PartialEq when None), the scheduler that enumerates the two sequences, and
whether the merge completes after them.
merge_change_sets_many
fn merge_change_sets_many(self: &Self, others: Vec<std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets of the sequence and of others, merged
(MergeChangeSets(IObservable<IChangeSet<TObject>>, IEnumerable<IObservable<IChangeSet< TObject>>>, ..)).
merge_change_sets_many_with
fn merge_change_sets_many_with(self: &Self, others: Vec<std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>>, equality_comparer: Option<std::rc::Rc<dyn Fn(&T, &T) -> bool>>, scheduler: Option<std::rc::Rc<dyn ferroui_reactive::concurrency::IScheduler>>, completable: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
merge_change_sets_many with every argument.
merge_many
fn merge_many<D: 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<D>> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<D>>
The values of the sequence that observable_selector chooses for each item, merged; the
sequence of an item is subscribed while the item is in the list. The merge completes
when the source and every sequence have completed
(MergeMany(Func<T, IObservable<TDestination>>)).
merge_many_change_sets
fn merge_many_change_sets<D: Clone + PartialEq + 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<D>>> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<D>>>
The change sets of the list that observable_selector chooses for each item, merged
(MergeManyChangeSets(Func<TObject, IObservable<IChangeSet<TDestination>>>, IEqualityComparer<TDestination>? = null)).
merge_many_change_sets_with_comparer
fn merge_many_change_sets_with_comparer<D: Clone + PartialEq + 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<D>>> + 'static, equality_comparer: impl Fn(&D, &D) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<D>>>
merge_many_change_sets with the equality of the
children, which the copies of the child lists use
(MergeManyChangeSets(.., IEqualityComparer<TDestination>)).
merge_many_cache_change_sets
fn merge_many_cache_change_sets<D: Clone + PartialEq + 'static, DK: Eq + std::hash::Hash + Clone + 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>>
The change sets of the cache that observable_selector chooses for each item, merged
into those of one cache (MergeManyChangeSets(Func<TObject, IObservable<IChangeSet< TDestination, TDestinationKey>>>, IEqualityComparer<TDestination>? = null, IComparer<TDestination>? = null)).
merge_many_cache_change_sets_with_comparer
fn merge_many_cache_change_sets_with_comparer<D: Clone + 'static, DK: Eq + std::hash::Hash + Clone + 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>> + 'static, equality_comparer: impl Fn(&D, &D) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>>
merge_many_cache_change_sets with the equality of
the children (MergeManyChangeSets(.., IEqualityComparer<TDestination>)).
merge_many_cache_change_sets_ordered_by
fn merge_many_cache_change_sets_ordered_by<D: Clone + PartialEq + 'static, DK: Eq + std::hash::Hash + Clone + 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>> + 'static, comparer: std::rc::Rc<dyn Fn(&D, &D) -> std::cmp::Ordering>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>>
merge_many_cache_change_sets where the value of a
key is the least child by comparer (MergeManyChangeSets(.., IComparer<TDestination>)).
merge_many_cache_change_sets_with
fn merge_many_cache_change_sets_with<D: Clone + PartialEq + 'static, DK: Eq + std::hash::Hash + Clone + 'static>(self: &Self, observable_selector: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>> + 'static, equality_comparer: Option<std::rc::Rc<dyn Fn(&D, &D) -> bool>>, comparer: Option<std::rc::Rc<dyn Fn(&D, &D) -> std::cmp::Ordering>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<D, DK>>>
merge_many_cache_change_sets with the equality of
the children (PartialEq when None) and their comparer
(MergeManyChangeSets(.., IEqualityComparer<TDestination>?, IComparer<TDestination>?)).
on_item_added
fn on_item_added(self: &Self, add_action: impl Fn(&T) -> () + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Runs add_action for each item added, a replacement included, before the change set is
forwarded (OnItemAdded(Action<T>)).
on_item_refreshed
fn on_item_refreshed(self: &Self, refresh_action: impl Fn(&T) -> () + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Runs refresh_action for each item refreshed, before the change set is forwarded
(OnItemRefreshed(Action<T>)).
on_item_removed
fn on_item_removed(self: &Self, remove_action: impl Fn(&T) -> () + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Runs remove_action for each item removed, a replaced one included, before the change
set is forwarded, and for every item left when the subscription ends
(OnItemRemoved(Action<T>, bool invokeOnUnsubscribe = true)).
on_item_removed_with
fn on_item_removed_with(self: &Self, remove_action: impl Fn(&T) -> () + 'static, invoke_on_unsubscribe: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
on_item_removed, for the items left when the subscription ends
only when invoke_on_unsubscribe is true (OnItemRemoved(Action<T>, bool)).
page
fn page(self: &Self, requests: std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::PageRequest>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::PageChangeSet<T>>>
The page of the items that the latest of requests asks for, with a description of
the page (Page(IObservable<IPageRequest>)). Pages count from 1.
populate_into
fn populate_into<D: crate::list::ISourceList<T> + Clone + 'static>(self: &Self, destination: &D) -> std::rc::Rc<dyn ferroui_system::IDisposable>
Applies each change set to destination (PopulateInto(ISourceList<T>)).
query_when_changed
fn query_when_changed(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
A copy of the items after each change set (QueryWhenChanged(), whose
IReadOnlyCollection<T> is a Vec<T>).
query_when_changed_with
fn query_when_changed_with<R: 'static>(self: &Self, result_selector: impl Fn(Vec<T>) -> R + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<R>>
What result_selector makes of the items after each change set
(QueryWhenChanged(Func<IReadOnlyCollection<TObject>, TDestination>)).
ref_count
fn ref_count(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
One list of the sequence, shared by the subscribers: made when the first subscribes,
disposed when the last unsubscribes (RefCount).
remove_index
fn remove_index(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets without the indexes of their changes; moves are left out (RemoveIndex).
reverse
fn reverse(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The changes of the list in reverse order (Reverse).
skip_initial
fn skip_initial(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets after the first one (SkipInitial).
sort
fn sort(self: &Self, comparer: std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items sorted by comparer (Sort(IComparer<T>), with no options, no resort, and
a reset threshold of 50).
sort_with
fn sort_with(self: &Self, comparer: std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>, options: crate::list::SortOptions, resort: Option<std::rc::Rc<dyn ferroui_system::IObservable<()>>>, comparer_changed: Option<std::rc::Rc<dyn ferroui_system::IObservable<std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>>>>, reset_threshold: usize) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
sort with every option (Sort(IComparer<T>, SortOptions options = None, IObservable<Unit>? resort = null, IObservable<IComparer<T>>? comparerChanged = null, int resetThreshold = 50)): resort sorts the items again (after they changed
in place), comparer_changed replaces the comparer, and a change set of more than
reset_threshold changes sorts every item again.
sort_on_observable
fn sort_on_observable(self: &Self, comparer_changed: std::rc::Rc<dyn ferroui_system::IObservable<std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The items sorted by the latest comparer of comparer_changed
(Sort(IObservable<IComparer<T>>), with no options, no resort, and a reset threshold
of 50). Until the first comparer, the items keep the order in which they come.
sort_on_observable_with
fn sort_on_observable_with(self: &Self, comparer_changed: std::rc::Rc<dyn ferroui_system::IObservable<std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>>>, options: crate::list::SortOptions, resort: Option<std::rc::Rc<dyn ferroui_system::IObservable<()>>>, reset_threshold: usize) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
sort_on_observable with every option
(Sort(IObservable<IComparer<T>>, SortOptions options = None, IObservable<Unit>? resort = null, int resetThreshold = 50)).
start_with_empty
fn start_with_empty(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
An empty change set, then the change sets (StartWithEmpty).
subscribe_many
fn subscribe_many(self: &Self, subscription_factory: impl Fn(&T) -> std::rc::Rc<dyn ferroui_system::IDisposable> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
Makes a subscription for each item with subscription_factory, when it is added; the
subscription is disposed when the item is removed or replaced, or when the subscription
to the result ends. The change sets are forwarded as they are
(SubscribeMany(Func<T, IDisposable>)).
suppress_refresh
fn suppress_refresh(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The changes without the refreshes (SuppressRefresh, WhereReasonsAreNot(Refresh)).
to_collection
fn to_collection(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
The items of the list after each change set (ToCollection): a copy of the items.
to_sorted_collection
fn to_sorted_collection<S: Ord + 'static>(self: &Self, sort: impl Fn(&T) -> S + 'static, sort_order: crate::binding::SortDirection) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
The items of the list after each change set, sorted by the key that sort gives
(ToSortedCollection(Func<TObject, TSortKey>, SortDirection sortOrder = Ascending)); a
stable sort, as OrderBy and OrderByDescending are.
to_sorted_collection_with_comparer
fn to_sorted_collection_with_comparer(self: &Self, comparer: std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>) -> std::rc::Rc<dyn ferroui_system::IObservable<Vec<T>>>
The items of the list after each change set, sorted by comparer
(ToSortedCollection(IComparer<TObject>)).
top
fn top(self: &Self, number_of_items: usize) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The first number_of_items items (Top(int)): the window from 0 of that size.
Panics
When number_of_items is 0 (ArgumentOutOfRangeException).
transform
fn transform<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T) -> U + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
Each item in the form transform_factory gives it, at the same position: an addition
or a replacement transforms the item, a refresh is forwarded, and removals and moves
apply to the transformed items
(Transform(Func<TSource, TDestination>, bool transformOnRefresh = false)).
transform_with
fn transform_with<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T) -> U + 'static, transform_on_refresh: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform that, when transform_on_refresh is true, transforms a
refreshed item again and emits a replacement
(Transform(Func<TSource, TDestination>, bool transformOnRefresh)).
transform_with_index
fn transform_with_index<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T, usize) -> U + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform with a factory of the item and its index
(Transform(Func<TSource, int, TDestination>, bool transformOnRefresh = false)).
transform_with_previous
fn transform_with_previous<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T, Option<&U>) -> U + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform with a factory of the item and the value it had (for a
replacement, or a refresh that transforms)
(Transform(Func<TSource, Optional<TDestination>, TDestination>, bool transformOnRefresh = false)).
transform_with_previous_and_index
fn transform_with_previous_and_index<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T, Option<&U>, usize) -> U + 'static, transform_on_refresh: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform with a factory of the item, the value it had and its
index, and the flag of transform_with
(Transform(Func<TSource, Optional<TDestination>, int, TDestination>, bool transformOnRefresh)).
try_transform
fn try_transform<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T) -> Result<U, ferroui_system::ObservableError> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform with a factory that may fail: its error ends the
sequence (Transform with a factory that throws).
try_transform_with_previous_and_index
fn try_transform_with_previous_and_index<U: Clone + PartialEq + 'static>(self: &Self, transform_factory: impl Fn(&T, Option<&U>, usize) -> Result<U, ferroui_system::ObservableError> + 'static, transform_on_refresh: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_with_previous_and_index with a
factory that may fail.
transform_many
fn transform_many<U: Clone + PartialEq + 'static>(self: &Self, many_selector: impl Fn(&T) -> Vec<U> + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
The items that many_selector gives for each item, as one list
(TransformMany(Func<TSource, IEnumerable<TDestination>>, IEqualityComparer<TDestination>? equalityComparer = null)).
transform_many_with_comparer
fn transform_many_with_comparer<U: Clone + PartialEq + 'static>(self: &Self, many_selector: impl Fn(&T) -> Vec<U> + 'static, equality_comparer: impl Fn(&U, &U) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_many whose items are compared by
equality_comparer (TransformMany(Func<TSource, IEnumerable<TDestination>>, IEqualityComparer<TDestination>)).
transform_many_observable_list
fn transform_many_observable_list<U: Clone + PartialEq + 'static, C: crate::list::IObservableList<U> + 'static>(self: &Self, many_selector: impl Fn(&T) -> C + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
The items of the list that many_selector gives for each item, as one list, followed
as the lists change
(TransformMany(Func<TSource, IObservableList<TDestination>>, IEqualityComparer<TDestination>? equalityComparer = null)).
transform_many_observable_list_with_comparer
fn transform_many_observable_list_with_comparer<U: Clone + PartialEq + 'static, C: crate::list::IObservableList<U> + 'static>(self: &Self, many_selector: impl Fn(&T) -> C + 'static, equality_comparer: impl Fn(&U, &U) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_many_observable_list whose items are
compared by equality_comparer
(TransformMany(Func<TSource, IObservableList<TDestination>>, IEqualityComparer<TDestination>)).
transform_many_observable_collection
fn transform_many_observable_collection<U: Clone + PartialEq + 'static, C: crate::binding::ObservableCollectionEx<U> + 'static>(self: &Self, many_selector: impl Fn(&T) -> C + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
The items of the observable collection that many_selector gives for each item, as one
list, followed as the collections change
(TransformMany(Func<TSource, ObservableCollection<TDestination>>, IEqualityComparer<TDestination>? equalityComparer = null),
TransformMany(Func<TSource, ReadOnlyObservableCollection<TDestination>>, IEqualityComparer<TDestination>? equalityComparer = null)).
transform_many_observable_collection_with_comparer
fn transform_many_observable_collection_with_comparer<U: Clone + PartialEq + 'static, C: crate::binding::ObservableCollectionEx<U> + 'static>(self: &Self, many_selector: impl Fn(&T) -> C + 'static, equality_comparer: impl Fn(&U, &U) -> bool + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<U>>>
transform_many_observable_collection
whose items are compared by equality_comparer
(TransformMany(Func<TSource, ObservableCollection<TDestination>>, IEqualityComparer<TDestination>),
TransformMany(Func<TSource, ReadOnlyObservableCollection<TDestination>>, IEqualityComparer<TDestination>)).
virtualise
fn virtualise(self: &Self, requests: std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::VirtualRequest>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::VirtualChangeSet<T>>>
The window of the items that the latest of requests asks for, with a description of
the window (Virtualise(IObservable<IVirtualRequest>)).
when_any_property_changed
fn when_any_property_changed(self: &Self, properties_to_monitor: &[&str]) -> std::rc::Rc<dyn ferroui_system::IObservable<T>>
where T: crate::binding::NotifyPropertyChangedEx
The item, whenever one of properties_to_monitor changes on it, or any property when
none is given, for every item, merged (WhenAnyPropertyChanged(params string[])).
when_property_changed
fn when_property_changed<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_accessor: P) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::binding::PropertyValue<T, <P as >::Value>>>
where <P as >::Value: 'static
The changes of the property of property_accessor of every item, as the item with the
value, the current values first, merged
(WhenPropertyChanged(Expression<Func<TObject, TValue>>, bool notifyOnInitialValue = true)).
Unlike the cache's, upstream's list form keeps the values that a null step of the path
interrupts (is_unobtainable).
when_property_changed_with
fn when_property_changed_with<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_accessor: P, notify_on_initial_value: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::binding::PropertyValue<T, <P as >::Value>>>
where <P as >::Value: 'static
when_property_changed that starts with the current
values only when notify_on_initial_value is true
(WhenPropertyChanged(Expression<Func<TObject, TValue>>, bool)).
when_value_changed
fn when_value_changed<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_accessor: P) -> std::rc::Rc<dyn ferroui_system::IObservable<Option<<P as >::Value>>>
where <P as >::Value: 'static
The values of the property of property_accessor of every item, its current value
first, merged (WhenValueChanged(Expression<Func<TObject, TValue>>, bool notifyOnInitialValue = true)).
Unlike the cache's, upstream's list form keeps the values that a null step of the path
interrupts, as the default value: they are None here.
when_value_changed_with
fn when_value_changed_with<P: crate::binding::IntoPropertyChain<T>>(self: &Self, property_accessor: P, notify_on_initial_value: bool) -> std::rc::Rc<dyn ferroui_system::IObservable<Option<<P as >::Value>>>
where <P as >::Value: 'static
when_value_changed that starts with the current values
only when notify_on_initial_value is true
(WhenValueChanged(Expression<Func<TObject, TValue>>, bool)).
where_reasons_are
fn where_reasons_are(self: &Self, reasons: &[crate::list::ListChangeReason]) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The changes of the given reasons, without their indexes (moves are dropped); the change
sets left empty are dropped (WhereReasonsAre(params ListChangeReason[])).
Panics
When reasons is empty (ArgumentException: "Must enter at least 1 reason"), and for a
refresh, which cannot be without an index.
where_reasons_are_not
fn where_reasons_are_not(self: &Self, reasons: &[crate::list::ListChangeReason]) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The changes of reasons other than the given ones, without their indexes (moves are
dropped), unless only refreshes are left out, which keeps the indexes; the change sets
left empty are dropped (WhereReasonsAreNot(params ListChangeReason[])).
Panics
When reasons is empty (ArgumentException: "Must enter at least 1 reason"), and for a
refresh, which cannot be without an index.
add_key
fn add_key<K: Eq + std::hash::Hash + Clone + 'static>(self: &Self, key_selector: impl Fn(&T) -> K + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<T, K>>>
The changes of the list as changes of a cache, each item keyed by key_selector
(AddKey(Func<TObject, TKey>)).
as_observable_list
fn as_observable_list(self: &Self) -> crate::list::ObservableList<T>
A read-only list of the items of the sequence (AsObservableList(IObservable<IChangeSet<T>>)).
collect_update_stats
fn collect_update_stats(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::diagnostics::ChangeSummary>>
The statistics of each change set and of all of them so far (CollectUpdateStats).
not_empty
fn not_empty(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::list::ChangeSet<T>>>
The change sets that have changes (NotEmpty).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.