Struct 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>
§impl<'leaf> PartialOrd for ScriptLeaf<'leaf>
impl<'leaf> PartialOrd for ScriptLeaf<'leaf>
impl<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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