pub enum ErrorCode {
Show 27 variants
AccountNotOpen,
AccountAlreadyOpen,
AccountClosed,
AccountCloseNotEmpty,
InvalidAccountName,
BalanceAssertionFailed,
BalanceToleranceExceeded,
PadWithoutBalance,
MultiplePadForBalance,
TransactionUnbalanced,
MultipleInterpolation,
NoPostings,
SinglePosting,
NoMatchingLot,
InsufficientUnits,
AmbiguousLotMatch,
NegativeInventory,
UndeclaredCurrency,
CurrencyNotAllowed,
DuplicateMetadataKey,
InvalidMetadataValue,
UnknownOption,
InvalidOptionValue,
DuplicateOption,
DocumentNotFound,
DateOutOfOrder,
FutureDate,
}Expand description
Validation error codes.
Error codes follow the spec in spec/validation.md.
Variants§
AccountNotOpen
E1001: Account used before it was opened.
AccountAlreadyOpen
E1002: Account already open (duplicate open directive).
AccountClosed
E1003: Account used after it was closed.
AccountCloseNotEmpty
E1004: Account close with non-zero balance.
InvalidAccountName
E1005: Invalid account name.
BalanceAssertionFailed
E2001: Balance assertion failed.
BalanceToleranceExceeded
E2002: Balance exceeds explicit tolerance.
PadWithoutBalance
E2003: Pad without subsequent balance assertion.
MultiplePadForBalance
E2004: Multiple pads for same balance assertion.
TransactionUnbalanced
E3001: Transaction does not balance.
MultipleInterpolation
E3002: Multiple postings missing amounts for same currency.
NoPostings
E3003: Transaction has no postings.
SinglePosting
E3004: Transaction has single posting (warning).
NoMatchingLot
E4001: No matching lot for reduction.
InsufficientUnits
E4002: Insufficient units in lot for reduction.
AmbiguousLotMatch
E4003: Ambiguous lot match in STRICT mode.
NegativeInventory
E4004: Reduction would create negative inventory.
UndeclaredCurrency
E5001: Currency not declared (when strict mode enabled).
CurrencyNotAllowed
E5002: Currency not allowed in account.
DuplicateMetadataKey
E6001: Duplicate metadata key.
InvalidMetadataValue
E6002: Invalid metadata value type.
UnknownOption
E7001: Unknown option name.
InvalidOptionValue
E7002: Invalid option value.
DuplicateOption
E7003: Duplicate non-repeatable option.
DocumentNotFound
E8001: Document file not found.
DateOutOfOrder
E10001: Date out of order (info only).
FutureDate
E10002: Entry dated in the future (warning).
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.