pub enum RoundMode {
Floor,
Ceil,
Truncate,
HalfUp,
HalfDown,
HalfEven,
Fract,
}Expand description
Rounding modes for decimal operations.
Variants§
Floor
Round toward negative infinity.
Ceil
Round toward positive infinity.
Truncate
Round toward zero (truncate).
HalfUp
Round half away from zero (>= 0.5 rounds up).
HalfDown
Round half toward zero (> 0.5 rounds up).
HalfEven
Banker’s rounding: half rounds to nearest even.
Fract
Return the fractional part only.
Trait Implementations§
impl Copy for RoundMode
impl StructuralPartialEq for RoundMode
Auto Trait Implementations§
impl Freeze for RoundMode
impl RefUnwindSafe for RoundMode
impl Send for RoundMode
impl Sync for RoundMode
impl Unpin for RoundMode
impl UnsafeUnpin for RoundMode
impl UnwindSafe for RoundMode
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