Enum bech32::primitives::decode::ChecksumError
source · #[non_exhaustive]pub enum ChecksumError {
CodeLength(CodeLengthError),
InvalidResidue,
InvalidLength,
}
Expand description
Errors in the checksum of a bech32 encoded string.
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.
CodeLength(CodeLengthError)
String exceeds maximum allowed length.
InvalidResidue
The checksum residue is not valid for the data.
InvalidLength
The checksummed string is not a valid length.
Trait Implementations§
source§impl Clone for ChecksumError
impl Clone for ChecksumError
source§fn clone(&self) -> ChecksumError
fn clone(&self) -> ChecksumError
Returns a copy 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 ChecksumError
impl Debug for ChecksumError
source§impl Display for ChecksumError
impl Display for ChecksumError
source§impl Error for ChecksumError
impl Error for ChecksumError
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 From<ChecksumError> for CheckedHrpstringError
impl From<ChecksumError> for CheckedHrpstringError
source§fn from(e: ChecksumError) -> Self
fn from(e: ChecksumError) -> Self
Converts to this type from the input type.
source§impl From<ChecksumError> for SegwitHrpstringError
impl From<ChecksumError> for SegwitHrpstringError
source§fn from(e: ChecksumError) -> Self
fn from(e: ChecksumError) -> Self
Converts to this type from the input type.
source§impl PartialEq<ChecksumError> for ChecksumError
impl PartialEq<ChecksumError> for ChecksumError
source§fn eq(&self, other: &ChecksumError) -> bool
fn eq(&self, other: &ChecksumError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ChecksumError
impl StructuralEq for ChecksumError
impl StructuralPartialEq for ChecksumError
Auto Trait Implementations§
impl RefUnwindSafe for ChecksumError
impl Send for ChecksumError
impl Sync for ChecksumError
impl Unpin for ChecksumError
impl UnwindSafe for ChecksumError
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