Struct git_features::progress::unit::human::Formatter [−][src]
pub struct Formatter { /* fields omitted */ }
Entry point to the lib. Use this to handle your formatting needs.
Implementations
impl Formatter
[src]
impl Formatter
[src]pub fn new() -> Formatter
[src]
Initializes a new Formatter
with default values.
pub fn with_decimals(&mut self, decimals: usize) -> &mut Formatter
[src]
Sets the decimals value for formatting the string.
pub fn with_separator(&mut self, separator: &str) -> &mut Formatter
[src]
Sets the separator value for formatting the string.
pub fn with_scales(&mut self, scales: Scales) -> &mut Formatter
[src]
Sets the scales value.
pub fn with_units(&mut self, units: &str) -> &mut Formatter
[src]
Sets the units value.
pub fn with_suffix(&mut self, suffix: &str) -> &mut Formatter
[src]
Sets the expected suffix value.
pub fn format(&self, value: f64) -> String
[src]
Formats the number into a string
pub fn parse(&self, value: &str) -> f64
[src]
Parse a string back into a float value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Formatter
impl RefUnwindSafe for Formatter
impl UnwindSafe for Formatter
impl UnwindSafe for Formatter