pub enum RoundingMode {
HalfUp,
HalfEven,
Truncate,
Floor,
Ceil,
}Expand description
Rounding strategy for numeric formatting.
Variants§
HalfUp
Round half away from zero (standard commercial / school rounding).
HalfEven
Round half to nearest even digit (banker’s rounding).
Truncate
Round towards zero (truncate).
Floor
Round towards negative infinity (floor).
Ceil
Round towards positive infinity (ceil).
Trait Implementations§
Source§impl Clone for RoundingMode
impl Clone for RoundingMode
Source§fn clone(&self) -> RoundingMode
fn clone(&self) -> RoundingMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RoundingMode
Source§impl Debug for RoundingMode
impl Debug for RoundingMode
Source§impl Default for RoundingMode
impl Default for RoundingMode
Source§fn default() -> RoundingMode
fn default() -> RoundingMode
Returns the “default value” for a type. Read more
impl Eq for RoundingMode
Source§impl PartialEq for RoundingMode
impl PartialEq for RoundingMode
impl StructuralPartialEq for RoundingMode
Auto Trait Implementations§
impl Forget for RoundingMode
impl Freeze for RoundingMode
impl Move for RoundingMode
impl RefUnwindSafe for RoundingMode
impl Send for RoundingMode
impl Sync for RoundingMode
impl Unpin for RoundingMode
impl UnsafeUnpin for RoundingMode
impl UnwindSafe for RoundingMode
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