FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AggregateNumber

    trait · ferroui-dynamic-data · v0.5.0

    trait AggregateNumber: Copy + PartialEq + PartialOrd + Debug + 'static
    

    A number that the aggregations add up and average (int, long, float, double).

    View source

    Members

    Average

    type Average: Copy + PartialEq + PartialOrd + Debug + 'static
    

    The type of an average: f64 for i32, i64 and f64 (double), f32 for f32 (float), as upstream's overloads of Avg return.

    Source

    ZERO

    const ZERO: Self
    

    Zero, the sum of no values.

    Source

    plus

    fn plus(self: Self, other: Self) -> Self
    

    self + other, wrapping on overflow for the integers.

    Source

    minus

    fn minus(self: Self, other: Self) -> Self
    

    self - other, wrapping on overflow for the integers.

    Source

    average

    fn average(sum: Self, count: i32) -> <Self as >::Average
    

    The average of count values (at least one) whose sum is sum: sum / (double)count for the integers and double, sum / count in float for float.

    Source

    to_average

    fn to_average(self: Self) -> <Self as >::Average
    

    The number as an average (the implicit conversion of upstream's emptyValue).

    Source

    Trait implementations

    Availability

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