pub enum BuilderError {
NoAccount,
InvalidAccount(ParseError),
AccountNotFinnish,
SumTooLarge,
InvalidCents,
ReferenceTooLarge,
InvalidReference(ParseIntError),
MalformedReference,
InvalidDate(ComponentRange),
}Expand description
Errors that may occur while building a Barcode.
Variants§
NoAccount
No account number was supplied to the builder.
InvalidAccount(ParseError)
The provided account number string could not be parsed as an IBAN.
AccountNotFinnish
The IBAN was valid but its country code is not FI.
SumTooLarge
The total sum exceeds the maximum the barcode format can encode (999 999,99 €).
InvalidCents
The cents value was outside the valid range 0..=99.
ReferenceTooLarge
The reference number is longer than the version allows (20 digits for V4, 23 digits for V5).
InvalidReference(ParseIntError)
The reference number could not be parsed as digits.
MalformedReference
A V5 reference number does not start with the required RF prefix.
InvalidDate(ComponentRange)
The supplied calendar date components do not form a valid date.
Trait Implementations§
Source§impl Clone for BuilderError
impl Clone for BuilderError
Source§fn clone(&self) -> BuilderError
fn clone(&self) -> BuilderError
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 BuilderError
impl Debug for BuilderError
Source§impl Display for BuilderError
impl Display for BuilderError
Source§impl Error for BuilderError
impl Error for BuilderError
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<ComponentRange> for BuilderError
impl From<ComponentRange> for BuilderError
Source§fn from(source: ComponentRange) -> Self
fn from(source: ComponentRange) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for BuilderError
impl From<ParseError> for BuilderError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for BuilderError
impl From<ParseIntError> for BuilderError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BuilderError
impl RefUnwindSafe for BuilderError
impl Send for BuilderError
impl Sync for BuilderError
impl Unpin for BuilderError
impl UnsafeUnpin for BuilderError
impl UnwindSafe for BuilderError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more