pub enum InvoiceError {
EmptyInvoiceNumber,
EmptyLineDescription,
InvalidDueDate,
NoLines,
Money(MoneyError),
}Expand description
Errors returned by invoice primitives.
Variants§
EmptyInvoiceNumber
Invoice number must not be empty.
EmptyLineDescription
Line description must not be empty.
InvalidDueDate
Due date must use YYYY-MM-DD shape.
NoLines
Invoices require at least one line.
Money(MoneyError)
Money arithmetic failed.
Trait Implementations§
Source§impl Clone for InvoiceError
impl Clone for InvoiceError
Source§fn clone(&self) -> InvoiceError
fn clone(&self) -> InvoiceError
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 InvoiceError
impl Debug for InvoiceError
Source§impl Display for InvoiceError
impl Display for InvoiceError
impl Eq for InvoiceError
Source§impl Error for InvoiceError
impl Error for InvoiceError
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 PartialEq for InvoiceError
impl PartialEq for InvoiceError
Source§fn eq(&self, other: &InvoiceError) -> bool
fn eq(&self, other: &InvoiceError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InvoiceError
Auto Trait Implementations§
impl Freeze for InvoiceError
impl RefUnwindSafe for InvoiceError
impl Send for InvoiceError
impl Sync for InvoiceError
impl Unpin for InvoiceError
impl UnsafeUnpin for InvoiceError
impl UnwindSafe for InvoiceError
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