Enum wallet::script::WitnessVersion [−][src]
Version of the WitnessProgram: first byte of scriptPubkey in
transaction output for transactions starting with opcodes ranging from 0
to 16 (inclusive).
Structure helps to limit possible version of the witness according to the
specification; if a plain u8 type will be used instead it will mean that
version > 16, which is incorrect.
Variants
Current, initial version of Witness Program. Used for P2WPKH and P2WPK outputs
Forthcoming second version of Witness Program, which (most probably) will be used for Taproot
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Future (unsupported) version of Witness Program
Trait Implementations
impl Clone for WitnessVersion[src]
fn clone(&self) -> WitnessVersion[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for WitnessVersion[src]
impl Debug for WitnessVersion[src]
impl Display for WitnessVersion[src]
impl Eq for WitnessVersion[src]
impl FromStr for WitnessVersion[src]
type Err = WitnessVersionError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>[src]
impl Hash for WitnessVersion[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for WitnessVersion[src]
fn cmp(&self, other: &WitnessVersion) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<WitnessVersion> for WitnessVersion[src]
fn eq(&self, other: &WitnessVersion) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<WitnessVersion> for WitnessVersion[src]
fn partial_cmp(&self, other: &WitnessVersion) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for WitnessVersion[src]
impl StructuralPartialEq for WitnessVersion[src]
impl TryFrom<All> for WitnessVersion[src]
type Error = WitnessVersionError
The type returned in the event of a conversion error.
fn try_from(value: All) -> Result<Self, Self::Error>[src]
Takes bitcoin Script opcode and returns either corresponding version of
the Witness program (for opcodes in range of OP_0..OP_16) or
WitnessVersionError::IncorrectOpcode error for the rest of opcodes
impl<'a> TryFrom<Instruction<'a>> for WitnessVersion[src]
type Error = WitnessVersionError
The type returned in the event of a conversion error.
fn try_from(instruction: Instruction<'a>) -> Result<Self, Self::Error>[src]
Takes bitcoin Script instruction (parsed opcode) and returns either corresponding version of the Witness program (for push-num instructions) or WitnessVersionError::IncorrectOpcode error for the rest of opcodes
impl TryFrom<u8> for WitnessVersion[src]
type Error = WitnessVersionError
The type returned in the event of a conversion error.
fn try_from(value: u8) -> Result<Self, Self::Error>[src]
Takes bitcoin Script value and returns either corresponding version of
the Witness program (for opcodes in range of OP_0..OP_16) or
WitnessVersionError::IncorrectOpcode error for the rest of opcodes
Auto Trait Implementations
impl RefUnwindSafe for WitnessVersion
impl Send for WitnessVersion
impl Sync for WitnessVersion
impl Unpin for WitnessVersion
impl UnwindSafe for WitnessVersion
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,