Struct size_format::SizeFormatter[][src]

pub struct SizeFormatter<BaseType, Prefix, Separator> where
    BaseType: Clone + Integer + Display + FromPrimitive + Pow<u32, Output = BaseType>,
    Ratio<BaseType>: FromPrimitive,
    Prefix: PrefixType,
    Separator: DecimalSeparator
{ /* fields omitted */ }

Represents a size that can be formatted.

Panics

  • May panic if the BaseType is too small for the prefix specified in Prefix and the number is being formatted.

Methods

impl<BaseType, Prefix, Separator> SizeFormatter<BaseType, Prefix, Separator> where
    BaseType: Clone + Integer + Display + FromPrimitive + Pow<u32, Output = BaseType>,
    Ratio<BaseType>: FromPrimitive,
    Prefix: PrefixType,
    Separator: DecimalSeparator
[src]

Creates a new size formatter for the given number.

Creates a new size formatter from a compatible number.

Trait Implementations

impl<BaseType, Prefix, Separator> Display for SizeFormatter<BaseType, Prefix, Separator> where
    BaseType: Clone + Integer + Display + FromPrimitive + Pow<u32, Output = BaseType>,
    Ratio<BaseType>: FromPrimitive,
    Prefix: PrefixType,
    Separator: DecimalSeparator
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<BaseType, Prefix, Separator> Send for SizeFormatter<BaseType, Prefix, Separator> where
    BaseType: Send,
    Prefix: Send,
    Separator: Send

impl<BaseType, Prefix, Separator> Sync for SizeFormatter<BaseType, Prefix, Separator> where
    BaseType: Sync,
    Prefix: Sync,
    Separator: Sync