Enum bech32::primitives::decode::SegwitHrpstringError
source · #[non_exhaustive]pub enum SegwitHrpstringError {
Unchecked(UncheckedHrpstringError),
NoData,
TooLong(usize),
InvalidWitnessVersion(Fe32),
Padding(PaddingError),
WitnessLength(WitnessLengthError),
Checksum(ChecksumError),
}
Expand description
An error while constructing a SegwitHrpstring
type.
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.
Unchecked(UncheckedHrpstringError)
Error while parsing the encoded address string.
NoData
No data found after removing the checksum.
TooLong(usize)
String exceeds maximum allowed length.
InvalidWitnessVersion(Fe32)
Invalid witness version (must be 0-16 inclusive).
Padding(PaddingError)
Invalid padding on the witness data.
WitnessLength(WitnessLengthError)
Invalid witness length.
Checksum(ChecksumError)
Invalid checksum.
Trait Implementations§
source§impl Clone for SegwitHrpstringError
impl Clone for SegwitHrpstringError
source§fn clone(&self) -> SegwitHrpstringError
fn clone(&self) -> SegwitHrpstringError
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 SegwitHrpstringError
impl Debug for SegwitHrpstringError
source§impl Display for SegwitHrpstringError
impl Display for SegwitHrpstringError
source§impl Error for SegwitHrpstringError
impl Error for SegwitHrpstringError
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 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 From<PaddingError> for SegwitHrpstringError
impl From<PaddingError> for SegwitHrpstringError
source§fn from(e: PaddingError) -> Self
fn from(e: PaddingError) -> Self
Converts to this type from the input type.
source§impl From<SegwitHrpstringError> for DecodeError
impl From<SegwitHrpstringError> for DecodeError
source§fn from(e: SegwitHrpstringError) -> Self
fn from(e: SegwitHrpstringError) -> Self
Converts to this type from the input type.
source§impl From<UncheckedHrpstringError> for SegwitHrpstringError
impl From<UncheckedHrpstringError> for SegwitHrpstringError
source§fn from(e: UncheckedHrpstringError) -> Self
fn from(e: UncheckedHrpstringError) -> Self
Converts to this type from the input type.
source§impl From<WitnessLengthError> for SegwitHrpstringError
impl From<WitnessLengthError> for SegwitHrpstringError
source§fn from(e: WitnessLengthError) -> Self
fn from(e: WitnessLengthError) -> Self
Converts to this type from the input type.
source§impl PartialEq<SegwitHrpstringError> for SegwitHrpstringError
impl PartialEq<SegwitHrpstringError> for SegwitHrpstringError
source§fn eq(&self, other: &SegwitHrpstringError) -> bool
fn eq(&self, other: &SegwitHrpstringError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SegwitHrpstringError
impl StructuralEq for SegwitHrpstringError
impl StructuralPartialEq for SegwitHrpstringError
Auto Trait Implementations§
impl RefUnwindSafe for SegwitHrpstringError
impl Send for SegwitHrpstringError
impl Sync for SegwitHrpstringError
impl Unpin for SegwitHrpstringError
impl UnwindSafe for SegwitHrpstringError
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