pub struct CurrencyCode { /* private fields */ }Expand description
It’s recommended to use the constants in the currencies module.
Implementations§
Source§impl CurrencyCode
impl CurrencyCode
Sourcepub unsafe fn new_unchecked(code: &[u8]) -> Self
pub unsafe fn new_unchecked(code: &[u8]) -> Self
Creates a new CurrencyCode value.
§Safety
Ensure that the code’s length is within range [2..5]. The code must consist only of uppercase ASCII characters, and be terminated by zeroes until the end of the slice.
Trait Implementations§
Source§impl AsRef<[u8]> for CurrencyCode
impl AsRef<[u8]> for CurrencyCode
Source§impl AsRef<str> for CurrencyCode
impl AsRef<str> for CurrencyCode
Source§impl Clone for CurrencyCode
impl Clone for CurrencyCode
Source§fn clone(&self) -> CurrencyCode
fn clone(&self) -> CurrencyCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CurrencyCode
impl Debug for CurrencyCode
Source§impl Default for CurrencyCode
The default currency code is USD.
impl Default for CurrencyCode
The default currency code is USD.
It is chosen for being the most traded currency.
Source§impl Display for CurrencyCode
impl Display for CurrencyCode
Source§impl FromStr for CurrencyCode
impl FromStr for CurrencyCode
Source§impl Hash for CurrencyCode
impl Hash for CurrencyCode
Source§impl Ord for CurrencyCode
impl Ord for CurrencyCode
Source§impl PartialEq for CurrencyCode
impl PartialEq for CurrencyCode
Source§impl PartialOrd for CurrencyCode
impl PartialOrd for CurrencyCode
Source§impl TryFrom<&[u8]> for CurrencyCode
impl TryFrom<&[u8]> for CurrencyCode
impl Copy for CurrencyCode
impl Eq for CurrencyCode
Auto Trait Implementations§
impl Freeze for CurrencyCode
impl RefUnwindSafe for CurrencyCode
impl Send for CurrencyCode
impl Sync for CurrencyCode
impl Unpin for CurrencyCode
impl UnwindSafe for CurrencyCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.