pub enum LeafVersion {
TapScript,
Future(FutureLeafVersion),
}
Expand description
The leaf version for tapleafs
Variants
TapScript
BIP-342 tapscript
Future(FutureLeafVersion)
Future leaf version
Implementations
Obtain LeafVersion from consensus byte representation.
Errors
- If the last bit of the
version
is odd. - If the
version
is 0x50 (TAPROOT_ANNEX_PREFIX
).
Get consensus representation of the LeafVersion
.
Trait Implementations
Deserializes LeafVersion as u8 using consensus encoding
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Serializes LeafVersion as u8 using consensus encoding
Auto Trait Implementations
impl RefUnwindSafe for LeafVersion
impl Send for LeafVersion
impl Sync for LeafVersion
impl Unpin for LeafVersion
impl UnwindSafe for LeafVersion
Blanket Implementations
Mutably borrows from an owned value. Read more