pub enum LeafVer {
    TapScript,
    Future(FutureLeafVer),
}Expand description
The leaf version for tapleafs.
Variants§
Implementations§
source§impl LeafVer
 
impl LeafVer
sourcepub fn from_consensus_u8(version: u8) -> Result<LeafVer, InvalidLeafVer>
 
pub fn from_consensus_u8(version: u8) -> Result<LeafVer, InvalidLeafVer>
Creates a LeafVer from consensus byte representation.
§Errors
- If the last bit of the versionis odd.
- If the versionis 0x50 (TAPROOT_ANNEX_PREFIX).
sourcepub fn to_consensus_u8(self) -> u8
 
pub fn to_consensus_u8(self) -> u8
Returns the consensus representation of this LeafVer.
Trait Implementations§
source§impl Ord for LeafVer
 
impl Ord for LeafVer
source§impl PartialEq for LeafVer
 
impl PartialEq for LeafVer
source§impl PartialOrd for LeafVer
 
impl PartialOrd for LeafVer
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§impl StrictDecode for LeafVer
 
impl StrictDecode for LeafVer
fn strict_decode(reader: &mut impl TypedRead) -> Result<LeafVer, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
source§impl StrictEncode for LeafVer
 
impl StrictEncode for LeafVer
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
    W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
source§impl StrictTuple for LeafVer
 
impl StrictTuple for LeafVer
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for LeafVer
 
impl StrictType for LeafVer
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
impl Copy for LeafVer
impl Eq for LeafVer
impl StrictProduct for LeafVer
impl StructuralPartialEq for LeafVer
Auto Trait Implementations§
impl Freeze for LeafVer
impl RefUnwindSafe for LeafVer
impl Send for LeafVer
impl Sync for LeafVer
impl Unpin for LeafVer
impl UnwindSafe for LeafVer
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
source§impl<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.