#[non_exhaustive]pub enum WitnessProgramError {
InvalidLength(usize),
InvalidSegwitV0Length(usize),
}Expand description
Witness-program shape error.
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.
InvalidLength(usize)
The witness program must be between 2 and 64 bytes in length.
InvalidSegwitV0Length(usize)
A v0 witness program must be either 20 or 32 bytes.
Trait Implementations§
Source§impl Clone for WitnessProgramError
impl Clone for WitnessProgramError
Source§fn clone(&self) -> WitnessProgramError
fn clone(&self) -> WitnessProgramError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WitnessProgramError
impl Debug for WitnessProgramError
Source§impl Display for WitnessProgramError
impl Display for WitnessProgramError
impl Eq for WitnessProgramError
Source§impl Error for WitnessProgramError
Available on crate feature std only.
impl Error for WitnessProgramError
Available on crate feature
std only.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<Infallible> for WitnessProgramError
impl From<Infallible> for WitnessProgramError
Source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WitnessProgramError
impl PartialEq for WitnessProgramError
impl StructuralPartialEq for WitnessProgramError
Auto Trait Implementations§
impl Freeze for WitnessProgramError
impl RefUnwindSafe for WitnessProgramError
impl Send for WitnessProgramError
impl Sync for WitnessProgramError
impl Unpin for WitnessProgramError
impl UnsafeUnpin for WitnessProgramError
impl UnwindSafe for WitnessProgramError
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