pub struct Decimal {
pub width: u8,
pub scale: u8,
pub value: i128,
}Expand description
A DECIMAL value: an unscaled i128 plus its declared width and scale.
Fields§
§width: u8Total number of significant digits.
scale: u8Number of digits after the decimal point.
value: i128The unscaled value: the represented number is value / 10^scale.
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
Source§impl PartialOrd for Decimal
impl PartialOrd for Decimal
impl StructuralPartialEq 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 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