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§
Source§impl Ord for Decimal
impl Ord for Decimal
Source§impl PartialOrd for Decimal
impl PartialOrd for Decimal
impl Copy for Decimal
impl Eq for Decimal
Auto Trait Implementations§
impl Freeze for Decimal
impl RefUnwindSafe for Decimal
impl Send for Decimal
impl Sync for Decimal
impl Unpin 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