pub enum LedgerError {
EmptyAccountId,
EmptyEntryId,
NoPostings,
NotBalanced,
Money(MoneyError),
}Expand description
Errors returned by ledger primitives.
Variants§
EmptyAccountId
Account identifiers must not be empty.
EmptyEntryId
Entry identifiers must not be empty.
NoPostings
Journal entries require at least one posting.
NotBalanced
Debits and credits did not balance.
Money(MoneyError)
Money arithmetic failed.
Trait Implementations§
Source§impl Clone for LedgerError
impl Clone for LedgerError
Source§fn clone(&self) -> LedgerError
fn clone(&self) -> LedgerError
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 LedgerError
impl Debug for LedgerError
Source§impl Display for LedgerError
impl Display for LedgerError
impl Eq for LedgerError
Source§impl Error for LedgerError
impl Error for LedgerError
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 LedgerError
impl PartialEq for LedgerError
Source§fn eq(&self, other: &LedgerError) -> bool
fn eq(&self, other: &LedgerError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LedgerError
Auto Trait Implementations§
impl Freeze for LedgerError
impl RefUnwindSafe for LedgerError
impl Send for LedgerError
impl Sync for LedgerError
impl Unpin for LedgerError
impl UnsafeUnpin for LedgerError
impl UnwindSafe for LedgerError
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