pub struct Eur(/* private fields */);Expand description
Money in euros, kept at full precision until Eur::round_cents.
Implementations§
Source§impl Eur
impl Eur
Sourcepub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_add(self, other: Self) -> Option<Self>
Checked addition; None on overflow.
Sourcepub fn checked_sub(self, other: Self) -> Option<Self>
pub fn checked_sub(self, other: Self) -> Option<Self>
Checked subtraction; None on overflow.
Source§impl Eur
impl Eur
Sourcepub fn round_cents(self) -> Self
pub fn round_cents(self) -> Self
Rounded to whole cents, half to even (banker’s rounding), for statements and invoices.
Trait Implementations§
impl Copy for Eur
Source§impl<'de> Deserialize<'de> for Eur
impl<'de> Deserialize<'de> for Eur
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Eur
Source§impl Ord for Eur
impl Ord for Eur
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Eur
impl PartialOrd for Eur
impl StructuralPartialEq for Eur
Auto Trait Implementations§
impl Forget for Eur
impl Freeze for Eur
impl Move for Eur
impl RefUnwindSafe for Eur
impl Send for Eur
impl Sync for Eur
impl Unpin for Eur
impl UnsafeUnpin for Eur
impl UnwindSafe for Eur
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