pub enum Rounding {
Trunc,
Ceil,
HalfEven,
HalfUp,
}Expand description
How to round when rendering an exact internal value into a coarser form.
Rule R: rounding exists only when rendering. No API that constructs
absolute time may round — construction from a foreign unit is exact or it is
UCAL-E0043.
Variants§
Trunc
Toward the datum.
Ceil
Away from the datum.
HalfEven
Nearest, ties to even. The default, and the mode §2.2 uses for the datum.
HalfUp
Nearest, ties away from the datum.
Trait Implementations§
impl Copy for Rounding
impl Eq for Rounding
Source§impl Ord for Rounding
impl Ord for Rounding
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Rounding
impl PartialOrd for Rounding
impl StructuralPartialEq for Rounding
Auto Trait Implementations§
impl Freeze for Rounding
impl RefUnwindSafe for Rounding
impl Send for Rounding
impl Sync for Rounding
impl Unpin for Rounding
impl UnsafeUnpin for Rounding
impl UnwindSafe for Rounding
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