UnitFormatTrait

Trait UnitFormatTrait 

Source
pub trait UnitFormatTrait {
    type System: MS;

    // Required methods
    fn as_string_abbr(&self, val: Measure<Self::System>) -> String;
    fn as_string_full(&self, val: Measure<Self::System>) -> String;
}

Required Associated Types§

Required Methods§

Source

fn as_string_abbr(&self, val: Measure<Self::System>) -> String

Format the given unit as a string with the specified unit suffix abbreviation after it

Source

fn as_string_full(&self, val: Measure<Self::System>) -> String

Format the given unit as a string with the full unit suffix

Implementors§

Source§

impl<'t, S: MS> UnitFormatTrait for UnitFormat<'t, S>

Available on crate features std and str only.