pub enum PriceError {
InvalidTaxRate(Decimal),
Money(MoneyError),
}Expand description
Errors for Price construction.
Variants§
InvalidTaxRate(Decimal)
Tax rate outside 0..=100.
Money(MoneyError)
Currency mismatch between net and tax operations.
Trait Implementations§
Source§impl Debug for PriceError
impl Debug for PriceError
Source§impl Display for PriceError
impl Display for PriceError
Source§impl Error for PriceError
impl Error for PriceError
Source§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()
Source§impl From<MoneyError> for PriceError
impl From<MoneyError> for PriceError
Source§fn from(source: MoneyError) -> Self
fn from(source: MoneyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PriceError
impl RefUnwindSafe for PriceError
impl Send for PriceError
impl Sync for PriceError
impl Unpin for PriceError
impl UnsafeUnpin for PriceError
impl UnwindSafe for PriceError
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