pub enum BaseConversionError {
InvalidLength {
expected: usize,
found: usize,
},
InvalidCharacter {
character: char,
offset: usize,
},
InvalidBaseConverterLength,
InvalidLastSymbol {
symbol: u8,
offset: usize,
},
UnknownError,
}
Expand description
Errors enumeration for Base 16/58/64 strings convertion.
Variants§
InvalidLength
Data have invalid length.
InvalidCharacter
Base58/64 have an invalid character.
InvalidBaseConverterLength
Base58/64 have invalid lendth
InvalidLastSymbol
Base64 have invalid last symbol (symbol, offset)
UnknownError
Unknown error
Trait Implementations§
Source§impl Clone for BaseConversionError
impl Clone for BaseConversionError
Source§fn clone(&self) -> BaseConversionError
fn clone(&self) -> BaseConversionError
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 BaseConversionError
impl Debug for BaseConversionError
Source§impl Display for BaseConversionError
impl Display for BaseConversionError
Source§impl Error for BaseConversionError
impl Error for BaseConversionError
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<DecodeError> for BaseConversionError
impl From<DecodeError> for BaseConversionError
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BaseConversionError
impl PartialEq for BaseConversionError
impl Copy for BaseConversionError
impl Eq for BaseConversionError
impl StructuralPartialEq for BaseConversionError
Auto Trait Implementations§
impl Freeze for BaseConversionError
impl RefUnwindSafe for BaseConversionError
impl Send for BaseConversionError
impl Sync for BaseConversionError
impl Unpin for BaseConversionError
impl UnwindSafe for BaseConversionError
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