FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AggregationCacheEx

    trait · ferroui-dynamic-data · v0.5.0

    trait AggregationCacheEx<T: Clone + 'static, K: Eq + Hash + Clone + 'static>
    

    The aggregations of caches (the overloads of AggregationEx, AvgEx, CountEx, MaxEx, StdDevEx and SumEx on IObservable<IChangeSet<TObject, TKey>>).

    View source

    Members

    for_aggregation

    fn for_aggregation(self: &Self) -> AggregateChangeSets<T>
    

    The change sets as aggregate change sets: an add, a remove, or an update as the remove of the previous item and the add of the current one; refreshes and moves are left out (ForAggregation<TObject, TKey>()).

    Source

    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<TObject, TValue>)).

    Source

    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<TObject, TValue>, TValue emptyValue)).

    Source

    count_cache

    fn count_cache(self: &Self) -> Rc<dyn IObservable<usize>>
    

    The count of the items after each change set (Count<TObject, TKey>(), and Count<TObject>(IObservable<IDistinctChangeSet<TObject>>)).

    Source

    is_empty_cache

    fn is_empty_cache(self: &Self) -> Rc<dyn IObservable<bool>>
    

    True at once, then whether there are no items after each change set (IsEmpty).

    Source

    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).

    Source

    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>)).

    Source

    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)).

    Source

    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>)).

    Source

    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)).

    Source

    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<TObject, TValue>, TValue fallbackValue)).

    Source

    sum_cache

    fn sum_cache<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<TObject, TValue>)).

    Source

    Trait implementations

    Availability

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