#[non_exhaustive]pub enum Error {
BadByte(u8),
BadChecksum(u32, u32),
InvalidLength(usize),
InvalidExtendedKeyVersion([u8; 4]),
InvalidAddressVersion(u8),
TooShort(usize),
Secp256k1(Error),
Hex(Error),
}
Expand description
An error that might occur during base58 decoding
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.
BadByte(u8)
Invalid character encountered
BadChecksum(u32, u32)
Checksum was not correct (expected, actual)
InvalidLength(usize)
The length (in bytes) of the object was not correct Note that if the length is excessively long the provided length may be an estimate (and the checksum step may be skipped).
InvalidExtendedKeyVersion([u8; 4])
Extended Key version byte(s) were not recognized
InvalidAddressVersion(u8)
Address version byte were not recognized
TooShort(usize)
Checked data was less than 4 bytes
Secp256k1(Error)
Secp256k1 error while parsing a secret key
Hex(Error)
Hex decoding error
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Ord for Error
impl Ord for Error
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
source§impl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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