FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Extremum

    trait · ferroui-reactive · v0.5.0

    trait Extremum: Sized + 'static
    

    A type Min and Max compare with their default comparison (upstream's overloads for int, long, float, double and their nullable forms, and Min<TSource>() and Max<TSource>() with Comparer<TSource>.Default).

    Implemented for the integer types, bool, char, String, &'static str, (), Duration, Instant and SystemTime by their total order; for f32 and f64 by their order, a NaN replacing the current value (as upstream's MinDouble, MaxDouble, ...); and for Option of any of them, a None being ignored and a sequence without a Some giving None (upstream's nullable forms and reference types). Other types implement the two comparisons, or use the comparer forms (min_with, max_with).

    View source

    Members

    replaces_min

    fn replaces_min(self: &Self, current: &Self) -> bool
    

    Whether self replaces current as the minimum (self < current).

    Source

    replaces_max

    fn replaces_max(self: &Self, current: &Self) -> bool
    

    Whether self replaces current as the maximum (self > current).

    Source

    is_null

    fn is_null(self: &Self) -> bool
    

    Whether the value is ignored (a null of upstream); false by default.

    Source

    empty

    fn empty() -> Option<Self>
    

    The value of a sequence without a value that is not ignored; None (the default) ends the sequence with SequenceError::NoElements (InvalidOperationException).

    Source

    Trait implementations

    Availability

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