pub struct FmtOptions {
pub width: Option<u32>,
pub precision: Option<u32>,
pub trailing_dot_zero: bool,
pub negative_zero: bool,
pub panic_on_issue: bool,
pub mode: FmtMode,
}Expand description
Formatting options for NumFmtBuffer methods
Fields§
§width: Option<u32>maximum string length
precision: Option<u32>number of fractional digits
trailing_dot_zero: booltrue: includes “.0” for integer values, false: only includes the integer part
negative_zero: booltrue: negative sign for “-0”, false: negative sign only for non-null values
panic_on_issue: booltrue: panics when cannot render value, false: does not panic, may return out-of-spec strings
mode: FmtModemode: Fix = fixed, Sci = scientific, Simple: simple format without width/precision
Trait Implementations§
Source§impl Clone for FmtOptions
impl Clone for FmtOptions
Source§fn clone(&self) -> FmtOptions
fn clone(&self) -> FmtOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FmtOptions
impl Debug for FmtOptions
Auto Trait Implementations§
impl Freeze for FmtOptions
impl RefUnwindSafe for FmtOptions
impl Send for FmtOptions
impl Sync for FmtOptions
impl Unpin for FmtOptions
impl UnsafeUnpin for FmtOptions
impl UnwindSafe for FmtOptions
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