Struct bdk_chain::bitcoin::taproot::ScriptLeaf
pub struct ScriptLeaf<'leaf> { /* private fields */ }
Expand description
Script leaf node in a taproot tree along with the merkle proof to get this node.
Returned by TapTree::script_leaves
Implementations§
§impl<'leaf> ScriptLeaf<'leaf>
impl<'leaf> ScriptLeaf<'leaf>
pub fn version(&self) -> LeafVersion
pub fn version(&self) -> LeafVersion
Obtains the version of the script leaf.
pub fn merkle_branch(&self) -> &TaprootMerkleBranch
pub fn merkle_branch(&self) -> &TaprootMerkleBranch
Obtains a reference to the merkle proof of the leaf.
pub fn from_leaf_node(leaf_node: &'leaf LeafNode) -> Option<ScriptLeaf<'leaf>>
pub fn from_leaf_node(leaf_node: &'leaf LeafNode) -> Option<ScriptLeaf<'leaf>>
Obtains a script leaf from the leaf node if the leaf is not hidden.
Trait Implementations§
§impl<'leaf> Clone for ScriptLeaf<'leaf>
impl<'leaf> Clone for ScriptLeaf<'leaf>
§fn clone(&self) -> ScriptLeaf<'leaf>
fn clone(&self) -> ScriptLeaf<'leaf>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<'leaf> Debug for ScriptLeaf<'leaf>
impl<'leaf> Debug for ScriptLeaf<'leaf>
§impl<'leaf> Hash for ScriptLeaf<'leaf>
impl<'leaf> Hash for ScriptLeaf<'leaf>
§impl<'leaf> Ord for ScriptLeaf<'leaf>
impl<'leaf> Ord for ScriptLeaf<'leaf>
§fn cmp(&self, other: &ScriptLeaf<'leaf>) -> Ordering
fn cmp(&self, other: &ScriptLeaf<'leaf>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl<'leaf> PartialEq for ScriptLeaf<'leaf>
impl<'leaf> PartialEq for ScriptLeaf<'leaf>
§fn eq(&self, other: &ScriptLeaf<'leaf>) -> bool
fn eq(&self, other: &ScriptLeaf<'leaf>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<'leaf> PartialOrd for ScriptLeaf<'leaf>
impl<'leaf> PartialOrd for ScriptLeaf<'leaf>
§fn partial_cmp(&self, other: &ScriptLeaf<'leaf>) -> Option<Ordering>
fn partial_cmp(&self, other: &ScriptLeaf<'leaf>) -> Option<Ordering>
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 moreimpl<'leaf> Eq for ScriptLeaf<'leaf>
impl<'leaf> StructuralPartialEq for ScriptLeaf<'leaf>
Auto Trait Implementations§
impl<'leaf> Freeze for ScriptLeaf<'leaf>
impl<'leaf> RefUnwindSafe for ScriptLeaf<'leaf>
impl<'leaf> Send for ScriptLeaf<'leaf>
impl<'leaf> Sync for ScriptLeaf<'leaf>
impl<'leaf> Unpin for ScriptLeaf<'leaf>
impl<'leaf> UnwindSafe for ScriptLeaf<'leaf>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more