pub enum ISO8583Error {
Show 21 variants
InvalidMTI(String),
InvalidFieldNumber(u8),
FieldNotPresent(u8),
InvalidFieldValue {
field: u8,
reason: String,
},
FieldLengthMismatch {
field: u8,
expected: usize,
actual: usize,
},
InvalidBitmap(String),
InvalidEncoding(String),
MessageTooShort {
expected: usize,
actual: usize,
},
InvalidPAN(String),
LuhnCheckFailed,
InvalidAmount(String),
InvalidDateTime {
field: u8,
reason: String,
},
MissingRequiredField(u8),
ParseError(String),
EncodingError(String),
ValidationError(String),
BuilderError(String),
InvalidMessageClass(String),
InvalidMessageFunction(String),
InvalidMessageOrigin(String),
Custom(String),
}Available on crate feature
std only.Expand description
Errors that can occur during ISO 8583 message processing
Variants§
InvalidMTI(String)
Invalid message type indicator
InvalidFieldNumber(u8)
Invalid field number
FieldNotPresent(u8)
Field not present in message
InvalidFieldValue
Invalid field value
FieldLengthMismatch
Field length mismatch
InvalidBitmap(String)
Invalid bitmap
InvalidEncoding(String)
Invalid encoding
MessageTooShort
Message too short
InvalidPAN(String)
Invalid PAN (Primary Account Number)
LuhnCheckFailed
Luhn check failed
InvalidAmount(String)
Invalid amount
InvalidDateTime
Invalid date/time
MissingRequiredField(u8)
Missing required field
ParseError(String)
Parse error
EncodingError(String)
Encoding error
ValidationError(String)
Validation error
BuilderError(String)
Builder error
InvalidMessageClass(String)
Invalid message class
InvalidMessageFunction(String)
Invalid message function
InvalidMessageOrigin(String)
Invalid message origin
Custom(String)
Custom error
Implementations§
Source§impl ISO8583Error
impl ISO8583Error
Sourcepub fn invalid_field_value<S: Into<String>>(field: u8, reason: S) -> Self
pub fn invalid_field_value<S: Into<String>>(field: u8, reason: S) -> Self
Create an invalid field value error
Sourcepub fn field_length_mismatch(field: u8, expected: usize, actual: usize) -> Self
pub fn field_length_mismatch(field: u8, expected: usize, actual: usize) -> Self
Create a field length mismatch error
Sourcepub fn message_too_short(expected: usize, actual: usize) -> Self
pub fn message_too_short(expected: usize, actual: usize) -> Self
Create a message too short error
Sourcepub fn invalid_datetime<S: Into<String>>(field: u8, reason: S) -> Self
pub fn invalid_datetime<S: Into<String>>(field: u8, reason: S) -> Self
Create an invalid date/time error
Trait Implementations§
Source§impl Clone for ISO8583Error
impl Clone for ISO8583Error
Source§fn clone(&self) -> ISO8583Error
fn clone(&self) -> ISO8583Error
Returns a duplicate of the value. Read more
1.0.0 · 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 ISO8583Error
impl Debug for ISO8583Error
Source§impl Display for ISO8583Error
impl Display for ISO8583Error
Source§impl Error for ISO8583Error
impl Error for ISO8583Error
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()
Source§impl From<&'static str> for ISO8583Error
impl From<&'static str> for ISO8583Error
Source§impl PartialEq for ISO8583Error
impl PartialEq for ISO8583Error
impl StructuralPartialEq for ISO8583Error
Auto Trait Implementations§
impl Freeze for ISO8583Error
impl RefUnwindSafe for ISO8583Error
impl Send for ISO8583Error
impl Sync for ISO8583Error
impl Unpin for ISO8583Error
impl UnsafeUnpin for ISO8583Error
impl UnwindSafe for ISO8583Error
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