pub struct Money(/* private fields */);Expand description
A non-negative USD amount represented exactly in billionths of one dollar.
Implementations§
Source§impl Money
impl Money
Sourcepub const fn from_usd_nanos(value: u64) -> Self
pub const fn from_usd_nanos(value: u64) -> Self
Constructs an amount from billionths of one US dollar.
Sourcepub const fn from_usd_micros(value: u64) -> Self
pub const fn from_usd_micros(value: u64) -> Self
Constructs an amount from millionths of one US dollar.
Trait Implementations§
impl Copy for Money
impl Eq for Money
Source§impl Ord for Money
impl Ord for Money
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 Money
impl PartialOrd for Money
impl StructuralPartialEq for Money
Auto Trait Implementations§
impl Freeze for Money
impl RefUnwindSafe for Money
impl Send for Money
impl Sync for Money
impl Unpin for Money
impl UnsafeUnpin for Money
impl UnwindSafe for Money
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