Enum bech32::primitives::segwit::WitnessLengthError
source · #[non_exhaustive]pub enum WitnessLengthError {
TooShort,
TooLong,
InvalidSegwitV0,
}
Expand description
Witness program invalid because of incorrect length.
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.
TooShort
The witness data is too short.
TooLong
The witness data is too long.
InvalidSegwitV0
The segwit v0 witness is not 20 or 32 bytes long.
Trait Implementations§
source§impl Clone for WitnessLengthError
impl Clone for WitnessLengthError
source§fn clone(&self) -> WitnessLengthError
fn clone(&self) -> WitnessLengthError
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 WitnessLengthError
impl Debug for WitnessLengthError
source§impl Display for WitnessLengthError
impl Display for WitnessLengthError
source§impl Error for WitnessLengthError
impl Error for WitnessLengthError
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<WitnessLengthError> for EncodeError
impl From<WitnessLengthError> for EncodeError
source§fn from(e: WitnessLengthError) -> Self
fn from(e: WitnessLengthError) -> 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<WitnessLengthError> for WitnessLengthError
impl PartialEq<WitnessLengthError> for WitnessLengthError
source§fn eq(&self, other: &WitnessLengthError) -> bool
fn eq(&self, other: &WitnessLengthError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for WitnessLengthError
impl StructuralEq for WitnessLengthError
impl StructuralPartialEq for WitnessLengthError
Auto Trait Implementations§
impl RefUnwindSafe for WitnessLengthError
impl Send for WitnessLengthError
impl Sync for WitnessLengthError
impl Unpin for WitnessLengthError
impl UnwindSafe for WitnessLengthError
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