pub struct Money { /* private fields */ }Implementations§
Source§impl Money
impl Money
pub fn new<T>(value: T) -> Selfwhere
T: Into<MoneyValue>,
pub fn add(&self, other: Money) -> Money
pub fn subtract(&self, other: Money) -> Money
pub fn multiply(&self, factor: f64) -> Money
pub fn divide(&self, divisor: f64) -> Money
pub fn get_cents(&self) -> i64
pub fn get_value(&self) -> f64
Trait Implementations§
impl Copy for Money
impl Eq 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