pub struct Formatter { /* private fields */ }
Available on crate feature
unit-human
only.Expand description
Entry point to the lib. Use this to handle your formatting needs.
Implementations§
source§impl Formatter
impl Formatter
sourcepub fn with_decimals(&mut self, decimals: usize) -> &mut Formatter
pub fn with_decimals(&mut self, decimals: usize) -> &mut Formatter
Sets the decimals value for formatting the string.
sourcepub fn with_separator(&mut self, separator: &str) -> &mut Formatter
pub fn with_separator(&mut self, separator: &str) -> &mut Formatter
Sets the separator value for formatting the string.
sourcepub fn with_scales(&mut self, scales: Scales) -> &mut Formatter
pub fn with_scales(&mut self, scales: Scales) -> &mut Formatter
Sets the scales value.
sourcepub fn with_units(&mut self, units: &str) -> &mut Formatter
pub fn with_units(&mut self, units: &str) -> &mut Formatter
Sets the units value.
sourcepub fn with_suffix(&mut self, suffix: &str) -> &mut Formatter
pub fn with_suffix(&mut self, suffix: &str) -> &mut Formatter
Sets the expected suffix value.