pub struct Formatter { /* private fields */ }
Available on crate features
progress
and 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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Formatter
impl RefUnwindSafe for Formatter
impl Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl UnwindSafe for Formatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more