FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Summable

    trait · ferroui-reactive · v0.5.0

    trait Summable: Sized + 'static
    

    A type Sum adds up (upstream's overloads of Sum for int, long, float, double and their nullable forms). The sum has the type of the values; the sum of an Option sequence ignores the None values and is always a Some (0 for no values).

    View source

    Members

    Sum

    type Sum: Copy + 'static
    

    The running sum: the type itself, f64 for f32 (as LINQ to Objects, which accumulates a float sum into a double).

    Source

    ZERO

    const ZERO: <Self as >::Sum
    

    The sum of no values.

    Source

    add

    fn add(sum: <Self as >::Sum, value: Self) -> Option<<Self as >::Sum>
    

    sum plus value (sum itself for a None), or None when the sum does not fit (the checked addition of int and long, which throws OverflowException).

    Source

    total

    fn total(sum: <Self as >::Sum) -> Self
    

    The sum as the value of the sequence.

    Source

    Trait implementations

    Availability

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