#[non_exhaustive]pub enum Invalid {
Empty,
TooLong {
max: usize,
},
Character {
ch: char,
},
Slash,
Length,
Country,
Checksum,
Format,
}Expand description
Why a text, reference, IBAN or BIC is not acceptable for a SEPA order.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
Empty, or only spaces (Anlage 3 2.1: text fields must not be blank).
TooLong
Longer than max characters.
Character
A character outside the allowed set.
Slash
A reference that starts or ends with / or contains //
(Anlage 3 2.1, footnote 8).
Length
Wrong length (IBAN 15..=34, BIC 8 or 11).
Country
The IBAN does not start with two letters and two check digits.
Checksum
The IBAN check digits are wrong (ISO 13616 mod 97).
Format
The BIC is not [A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?.
Trait Implementations§
impl Copy for Invalid
impl Eq for Invalid
Source§impl Error for Invalid
impl Error for Invalid
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<Invalid> for InvalidReason
impl From<Invalid> for InvalidReason
impl StructuralPartialEq for Invalid
Auto Trait Implementations§
impl Forget for Invalid
impl Freeze for Invalid
impl Move for Invalid
impl RefUnwindSafe for Invalid
impl Send for Invalid
impl Sync for Invalid
impl Unpin for Invalid
impl UnsafeUnpin for Invalid
impl UnwindSafe for Invalid
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