#[non_exhaustive]pub enum CurrencyError {
Unstated,
Ambiguous {
currencies: Vec<String>,
},
}Expand description
Why a monetary total could not be trusted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unstated
The file states no monetary unit at all.
Amounts are still readable; they simply have no stated currency, so a total is a bare number rather than money.
Ambiguous
The file states more than one currency.
Every distinct currency found, sorted for determinism. Summing across them requires an exchange rate this crate does not have and will not invent.
Trait Implementations§
Source§impl Clone for CurrencyError
impl Clone for CurrencyError
Source§fn clone(&self) -> CurrencyError
fn clone(&self) -> CurrencyError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CurrencyError
impl Debug for CurrencyError
impl Eq for CurrencyError
Source§impl PartialEq for CurrencyError
impl PartialEq for CurrencyError
impl StructuralPartialEq for CurrencyError
Auto Trait Implementations§
impl Freeze for CurrencyError
impl RefUnwindSafe for CurrencyError
impl Send for CurrencyError
impl Sync for CurrencyError
impl Unpin for CurrencyError
impl UnsafeUnpin for CurrencyError
impl UnwindSafe for CurrencyError
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