AggregationListEx
trait · ferroui-dynamic-data · v0.5.0
trait AggregationListEx<T: Clone + PartialEq + 'static>
The aggregations of lists (the overloads of AggregationEx, AvgEx, CountEx, MaxEx,
StdDevEx and SumEx on IObservable<IChangeSet<T>>).
Members
for_aggregationavgavg_withcount_listis_empty_listis_not_emptymaximummaximum_withminimumminimum_withstd_devsum_list
for_aggregation
fn for_aggregation(self: &Self) -> AggregateChangeSets<T>
The change sets as aggregate change sets: adds and ranges of adds, removes and ranges of
removes and clears, or a replace as the remove of the previous item and the add of the
current one; refreshes and moves are left out (ForAggregation<TObject>()).
avg
fn avg<V: AggregateValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static) -> Rc<dyn IObservable<<<V as >::Number as AggregateNumber>::Average>>
The average of the values of the items after each change set, zero when there are none
(Avg(Func<T, TValue>)).
avg_with
fn avg_with<V: AggregateValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static, empty_value: <V as >::Number) -> Rc<dyn IObservable<<<V as >::Number as AggregateNumber>::Average>>
avg with the value when there are no items
(Avg(Func<T, TValue>, TValue emptyValue)).
count_list
fn count_list(self: &Self) -> Rc<dyn IObservable<usize>>
The count of the items after each change set (Count<TObject>()).
is_empty_list
fn is_empty_list(self: &Self) -> Rc<dyn IObservable<bool>>
True at once, then whether there are no items after each change set (IsEmpty).
is_not_empty
fn is_not_empty(self: &Self) -> Rc<dyn IObservable<bool>>
False at once, then whether there are items after each change set (IsNotEmpty).
maximum
fn maximum<R: Copy + PartialOrd + Default + 'static>(self: &Self, value_selector: impl Fn(&T) -> R + 'static) -> Rc<dyn IObservable<R>>
The greatest value of the items, R::default() when there are none, each time it changes
(Maximum(Func<TObject, TResult>)).
maximum_with
fn maximum_with<R: Copy + PartialOrd + 'static>(self: &Self, value_selector: impl Fn(&T) -> R + 'static, empty_value: R) -> Rc<dyn IObservable<R>>
maximum with the value when there are no items
(Maximum(Func<TObject, TResult>, TResult emptyValue)).
minimum
fn minimum<R: Copy + PartialOrd + Default + 'static>(self: &Self, value_selector: impl Fn(&T) -> R + 'static) -> Rc<dyn IObservable<R>>
The least value of the items, R::default() when there are none, each time it changes
(Minimum(Func<TObject, TResult>)).
minimum_with
fn minimum_with<R: Copy + PartialOrd + 'static>(self: &Self, value_selector: impl Fn(&T) -> R + 'static, empty_value: R) -> Rc<dyn IObservable<R>>
minimum with the value when there are no items
(Minimum(Func<TObject, TResult>, TResult emptyValue)).
std_dev
fn std_dev<V: StdDevValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static, fallback_value: V) -> Rc<dyn IObservable<f64>>
The sample standard deviation of the values of the items after each change set,
fallback_value for fewer than two items (StdDev(Func<T, TValue>, TValue fallbackValue)).
sum_list
fn sum_list<V: AggregateValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static) -> Rc<dyn IObservable<<V as >::Number>>
The sum of the values of the items after each change set (Sum(Func<T, TValue>)).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.