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
version
is odd. - If the
version
is 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<'de> Deserialize<'de> for LeafVer
impl<'de> Deserialize<'de> for LeafVer
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LeafVer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LeafVer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for LeafVer
impl Ord for LeafVer
Source§impl PartialOrd for LeafVer
impl PartialOrd for LeafVer
Source§impl Serialize for LeafVer
impl Serialize for LeafVer
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.