[][src]Trait number_prefix::Amounts

pub trait Amounts: Copy + Sized + PartialOrd + Div<Output = Self> + Neg<Output = Self> {
    const NUM_1000: Self;
    const NUM_1024: Self;

    fn is_negative(self) -> bool;
}

Traits for floating-point values for both the possible multipliers. They need to be Copy, have defined 1000 and 1024s, and implement a bunch of operators.

Associated Constants

const NUM_1000: Self

The constant representing 1000, for decimal prefixes.

const NUM_1024: Self

The constant representing 1024, for binary prefixes.

Loading content...

Required methods

fn is_negative(self) -> bool

Whether this number is negative. This is used internally.

Loading content...

Implementations on Foreign Types

impl Amounts for f32[src]

impl Amounts for f64[src]

Loading content...

Implementors

Loading content...