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§
Sourcetype Backing: FormatImpl
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§
Sourcefn si_format(self) -> SiFormatted<Self::Backing>
fn si_format(self) -> SiFormatted<Self::Backing>
Wraps self for formatting. The returned object can be further configured before display.