pub struct Decimal { /* private fields */ }Expand description
A fixed-point decimal type
Implementations§
Source§impl Decimal
impl Decimal
Sourcepub fn integer_value(&self, exponent: usize) -> i64
pub fn integer_value(&self, exponent: usize) -> i64
Get the decimal’s value in an integer type, by multiplying
by some power of ten to ensure the returned value is 10 **
exponent types the actual value.
Sourcepub fn nonnegative(&self) -> bool
pub fn nonnegative(&self) -> bool
Returns whether or not the number is nonnegative
Trait Implementations§
impl Copy for Decimal
impl Eq for Decimal
Source§impl Ord for Decimal
impl Ord for Decimal
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
Auto Trait Implementations§
impl Freeze for Decimal
impl RefUnwindSafe for Decimal
impl Send for Decimal
impl Sync for Decimal
impl Unpin for Decimal
impl UnsafeUnpin for Decimal
impl UnwindSafe for Decimal
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