Enum MoneyError
pub enum MoneyError {
CurrencyMismatch(CurrencyMismatch),
Amount(AmountError),
}Expand description
Errors returned by money helpers.
Variants§
CurrencyMismatch(CurrencyMismatch)
A same-currency operation received different currencies.
Amount(AmountError)
Amount arithmetic failed.
Trait Implementations§
§impl Clone for MoneyError
impl Clone for MoneyError
§fn clone(&self) -> MoneyError
fn clone(&self) -> MoneyError
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 more§impl Debug for MoneyError
impl Debug for MoneyError
§impl Display for MoneyError
impl Display for MoneyError
§impl Error for MoneyError
impl Error for MoneyError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
§impl PartialEq for MoneyError
impl PartialEq for MoneyError
impl Eq for MoneyError
impl StructuralPartialEq for MoneyError
Auto Trait Implementations§
impl Freeze for MoneyError
impl RefUnwindSafe for MoneyError
impl Send for MoneyError
impl Sync for MoneyError
impl Unpin for MoneyError
impl UnsafeUnpin for MoneyError
impl UnwindSafe for MoneyError
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