[−][src]Enum iban::ParseIbanError
An error indicating the IBAN could not be parsed.
Example
use iban::{BaseIban, Iban, ParseIbanError, ParseBaseIbanError}; use core::convert::TryFrom; // The following IBAN has an invalid checksum assert_eq!( "MR00 0002 0001 0100 0012 3456 754".parse::<Iban>(), Err(ParseIbanError::from(ParseBaseIbanError::InvalidChecksum)) ); // The following IBAN doesn't follow the country format let base_iban: BaseIban = "AL84212110090000AB023569874".parse()?; assert_eq!( Iban::try_from(base_iban), Err(ParseIbanError::InvalidBban(base_iban)) );
Variants
This variant indicates that the basic IBAN structure was not followed.
Fields of InvalidBaseIban
source: ParseBaseIbanError
The error indicating what went wrong when parsing the Iban.
InvalidBban(BaseIban)
This variant indicates that the BBAN did not follow the correct format.
The BaseIban
provides functionality on the IBAN part of the
address.
UnknownCountry(BaseIban)
This variant indicated that the country code of the IBAN was not recognized.
The BaseIban
provides functionality on the IBAN part of the
address.
Trait Implementations
impl Clone for ParseIbanError
[src]
fn clone(&self) -> ParseIbanError
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ParseIbanError
[src]
impl Debug for ParseIbanError
[src]
impl Display for ParseIbanError
[src]
impl Eq for ParseIbanError
[src]
impl Error for ParseIbanError
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<ParseBaseIbanError> for ParseIbanError
[src]
fn from(source: ParseBaseIbanError) -> ParseIbanError
[src]
impl Hash for ParseIbanError
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ParseIbanError> for ParseIbanError
[src]
fn eq(&self, other: &ParseIbanError) -> bool
[src]
fn ne(&self, other: &ParseIbanError) -> bool
[src]
impl StructuralEq for ParseIbanError
[src]
impl StructuralPartialEq for ParseIbanError
[src]
Auto Trait Implementations
impl RefUnwindSafe for ParseIbanError
impl Send for ParseIbanError
impl Sync for ParseIbanError
impl Unpin for ParseIbanError
impl UnwindSafe for ParseIbanError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,