pub enum FormatStyle {
Mixed,
LargestUnitDecimal,
}Expand description
Formatting style.
Variants§
Mixed
Mixed units, descending, with decimals only on the last (seconds) component. Sub-second durations use ms/us/ns.
LargestUnitDecimal
Single largest unit with a decimal fraction if needed, e.g., "1.5h", "90s", "0.123s".
This style cannot always be finite-decimal exact (e.g., 30s in hours),
but it still round-trips because the parser accepts up to 9 fractional digits.
Trait Implementations§
Source§impl Clone for FormatStyle
impl Clone for FormatStyle
Source§fn clone(&self) -> FormatStyle
fn clone(&self) -> FormatStyle
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 FormatStyle
impl Debug for FormatStyle
impl Copy for FormatStyle
Auto Trait Implementations§
impl Freeze for FormatStyle
impl RefUnwindSafe for FormatStyle
impl Send for FormatStyle
impl Sync for FormatStyle
impl Unpin for FormatStyle
impl UnwindSafe for FormatStyle
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