[−][src]Enum lnpbp::bp::WitnessVersion
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]
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 From<WitnessVersion> for All
[src]
fn from(ver: WitnessVersion) -> Self
[src]
Converts WitnessVersion
instance into corresponding Bitcoin script
opcode (OP_0
..OP_16
)
impl Hash for WitnessVersion
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
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]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<WitnessVersion> for WitnessVersion
[src]
fn eq(&self, other: &WitnessVersion) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<WitnessVersion> for WitnessVersion
[src]
fn partial_cmp(&self, other: &WitnessVersion) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.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,
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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,