pub struct Decimal64 {
pub scale: u8,
pub value: i64,
}Expand description
Represents a decimal number with 64-bit precision.
This structure stores a decimal value as an integer with a scale factor, allowing for precise representation of decimal numbers without floating-point errors. The scale indicates how many decimal places the value has (e.g., scale=2 means 2 decimal places).
Fields§
§scale: u8Number of decimal places (e.g., 2 for values like 123.45)
value: i64The actual value, scaled by 10^scale (e.g., 12345 for 123.45 with scale=2)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decimal64
impl RefUnwindSafe for Decimal64
impl Send for Decimal64
impl Sync for Decimal64
impl Unpin for Decimal64
impl UnwindSafe for Decimal64
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