pub enum Bai2Error {
EmptyLine,
MissingTerminator,
MissingRecordCode,
UnknownRecordCode(String),
UnexpectedRecordCode {
expected: RecordCode,
actual: RecordCode,
},
MissingField {
record: RecordCode,
field: &'static str,
},
InvalidAmount,
InvalidCount,
OrphanContinuation,
UnknownTransactionDirection(String),
}Expand description
Errors returned by BAI2 parsing and validation.
Variants§
EmptyLine
The input line was empty.
MissingTerminator
A BAI2 line did not end with /.
MissingRecordCode
A record code was missing.
UnknownRecordCode(String)
The record code is unsupported.
UnexpectedRecordCode
A record had an unexpected code.
MissingField
A required field was missing.
InvalidAmount
An amount field was invalid.
InvalidCount
A count field was invalid or unexpected.
OrphanContinuation
A continuation record appeared before a logical record.
UnknownTransactionDirection(String)
A transaction type code could not be mapped into a direction.
Trait Implementations§
impl Eq for Bai2Error
Source§impl Error for Bai2Error
impl Error for Bai2Error
1.30.0 · 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()
impl StructuralPartialEq for Bai2Error
Auto Trait Implementations§
impl Freeze for Bai2Error
impl RefUnwindSafe for Bai2Error
impl Send for Bai2Error
impl Sync for Bai2Error
impl Unpin for Bai2Error
impl UnsafeUnpin for Bai2Error
impl UnwindSafe for Bai2Error
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