#[repr(u8)]pub enum RoundingMode {
TiesToEven = 0,
TowardZero = 1,
TowardNegative = 2,
TowardPositive = 3,
TiesToAway = 4,
}
Expand description
floating-point rounding mode
Variants§
TiesToEven = 0
round to nearest, ties to even
TowardZero = 1
round toward zero
TowardNegative = 2
round toward negative infinity
TowardPositive = 3
round toward positive infinity
TiesToAway = 4
round to nearest, ties away from zero
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 · 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 RoundingMode
impl Debug for RoundingMode
Source§impl Default for RoundingMode
impl Default for RoundingMode
Source§impl Hash for RoundingMode
impl Hash for RoundingMode
Source§impl PartialEq for RoundingMode
impl PartialEq for RoundingMode
impl Copy for RoundingMode
impl Eq for RoundingMode
impl StructuralPartialEq for RoundingMode
Auto Trait Implementations§
impl Freeze for RoundingMode
impl RefUnwindSafe for RoundingMode
impl Send for RoundingMode
impl Sync for RoundingMode
impl Unpin 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