pub struct NumberFormatter {
pub decimal_places: usize,
pub thousands_separator: bool,
}Expand description
Formats Cell::Int and Cell::Float with configurable decimal places and
optional thousands separators. Non-numeric cells fall back to DefaultFormatter.
Fields§
§decimal_places: usizeNumber of decimal places shown for float values (and int values cast to
float when decimal_places > 0).
thousands_separator: boolIf true, inserts ',' every three integer digits.
Trait Implementations§
Source§impl CellFormatter for NumberFormatter
impl CellFormatter for NumberFormatter
Auto Trait Implementations§
impl Freeze for NumberFormatter
impl RefUnwindSafe for NumberFormatter
impl Send for NumberFormatter
impl Sync for NumberFormatter
impl Unpin for NumberFormatter
impl UnsafeUnpin for NumberFormatter
impl UnwindSafe for NumberFormatter
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