pub struct Currency(/* private fields */);Expand description
A currency by its code: three upper-case letters for an ISO 4217 currency (EUR, CHF), x- and 1–62 characters
of a-z, 0-9 and - for a currency defined outside ISO 4217 (x-btc, x-galleon).
The two forms cannot collide. Only the form is checked; whether a code denotes an existing currency, and how it
divides, is reference data (CurrencyDefinition), not protocol.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Currency
impl<'de> Deserialize<'de> for Currency
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Currency
Source§impl Ord for Currency
impl Ord for Currency
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 Currency
impl PartialOrd for Currency
impl StructuralPartialEq for Currency
Auto Trait Implementations§
impl Freeze for Currency
impl RefUnwindSafe for Currency
impl Send for Currency
impl Sync for Currency
impl Unpin for Currency
impl UnsafeUnpin for Currency
impl UnwindSafe for Currency
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