Formattable

Trait Formattable 

Source
pub trait Formattable {
    type Backing: FormatImpl;

    // Required method
    fn si_format(self) -> SiFormatted<Self::Backing>;
}
Expand description

A Type that can be formatted with a SiFormat.

Required Associated Types§

Source

type Backing: FormatImpl

To reduce binary size, most types are formatted by casting them to another type and formatting that. This is that type. Currently, all values are formatted as floats, though this may change in the future. The concrete backing type used for any type is an implementation detail and you should not rely on it.

Required Methods§

Source

fn si_format(self) -> SiFormatted<Self::Backing>

Wraps self for formatting. The returned object can be further configured before display.

Implementations on Foreign Types§

Source§

impl Formattable for f32

Source§

impl Formattable for f64

Source§

impl Formattable for i8

Source§

impl Formattable for i16

Source§

impl Formattable for i32

Source§

impl Formattable for i64

Source§

impl Formattable for i128

Source§

impl Formattable for u8

Source§

impl Formattable for u16

Source§

impl Formattable for u32

Source§

impl Formattable for u64

Source§

impl Formattable for u128

Implementors§