pub struct Currency<L: CurrencyLocale> { /* private fields */ }Expand description
Represents a currency value with specified localization.
Implementations§
source§impl<L: CurrencyLocale> Currency<L>
impl<L: CurrencyLocale> Currency<L>
Trait Implementations§
source§impl<L, T> AddAssign<T> for Currency<L>
impl<L, T> AddAssign<T> for Currency<L>
source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the
+= operation. Read moresource§impl<L> Display for Currency<L>where
L: CurrencyLocale,
impl<L> Display for Currency<L>where
L: CurrencyLocale,
source§impl<L> From<f32> for Currency<L>where
L: CurrencyLocale + Default,
impl<L> From<f32> for Currency<L>where
L: CurrencyLocale + Default,
Assumes that the f32 is meant as a money value, for example 10.99 would be 10.99
source§impl<L> From<f64> for Currency<L>where
L: CurrencyLocale + Default,
impl<L> From<f64> for Currency<L>where
L: CurrencyLocale + Default,
Assumes that the f64 is meant as a money value, for example 10.99 would be 10.99
source§impl<L> From<usize> for Currency<L>where
L: CurrencyLocale + Default,
impl<L> From<usize> for Currency<L>where
L: CurrencyLocale + Default,
The value is interpreted as the smallest possible amount, so 1 would be 0.01
source§impl<L: Ord + CurrencyLocale> Ord for Currency<L>
impl<L: Ord + CurrencyLocale> Ord for Currency<L>
1.21.0 · 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<L: PartialEq + CurrencyLocale> PartialEq for Currency<L>
impl<L: PartialEq + CurrencyLocale> PartialEq for Currency<L>
source§impl<L: CurrencyLocale + PartialEq> PartialOrd for Currency<L>
impl<L: CurrencyLocale + PartialEq> PartialOrd for Currency<L>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<L, T> SubAssign<T> for Currency<L>
impl<L, T> SubAssign<T> for Currency<L>
source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the
-= operation. Read moreimpl<L: Copy + CurrencyLocale> Copy for Currency<L>
impl<L: Eq + CurrencyLocale> Eq for Currency<L>
impl<L: CurrencyLocale> StructuralEq for Currency<L>
impl<L: CurrencyLocale> StructuralPartialEq for Currency<L>
Auto Trait Implementations§
impl<L> RefUnwindSafe for Currency<L>where
L: RefUnwindSafe,
impl<L> Send for Currency<L>where
L: Send,
impl<L> Sync for Currency<L>where
L: Sync,
impl<L> Unpin for Currency<L>where
L: Unpin,
impl<L> UnwindSafe for Currency<L>where
L: UnwindSafe,
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