pub struct ScriptLeaf { /* private fields */ }
Expand description
Store information about taproot leaf node.
Implementations§
Source§impl ScriptLeaf
impl ScriptLeaf
Sourcepub fn leaf_hash(&self) -> TapLeafHash
pub fn leaf_hash(&self) -> TapLeafHash
Computes a leaf hash for this ScriptLeaf
.
Sourcepub fn leaf_version(&self) -> LeafVersion
pub fn leaf_version(&self) -> LeafVersion
Returns leaf version of the script.
Sourcepub fn merkle_branch(&self) -> &TaprootMerkleBranch
pub fn merkle_branch(&self) -> &TaprootMerkleBranch
Returns reference to the merkle proof (hashing partners) to get this
node in form of TaprootMerkleBranch
.
Trait Implementations§
Source§impl Clone for ScriptLeaf
impl Clone for ScriptLeaf
Source§fn clone(&self) -> ScriptLeaf
fn clone(&self) -> ScriptLeaf
Returns a duplicate 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 moreSource§impl Debug for ScriptLeaf
impl Debug for ScriptLeaf
Source§impl<'de> Deserialize<'de> for ScriptLeaf
impl<'de> Deserialize<'de> for ScriptLeaf
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ScriptLeaf
impl Hash for ScriptLeaf
Source§impl Ord for ScriptLeaf
impl Ord for ScriptLeaf
Source§fn cmp(&self, other: &ScriptLeaf) -> Ordering
fn cmp(&self, other: &ScriptLeaf) -> 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
Source§impl PartialEq for ScriptLeaf
impl PartialEq for ScriptLeaf
Source§impl PartialOrd for ScriptLeaf
impl PartialOrd for ScriptLeaf
Source§impl Serialize for ScriptLeaf
impl Serialize for ScriptLeaf
impl Eq for ScriptLeaf
impl StructuralPartialEq for ScriptLeaf
Auto Trait Implementations§
impl Freeze for ScriptLeaf
impl RefUnwindSafe for ScriptLeaf
impl Send for ScriptLeaf
impl Sync for ScriptLeaf
impl Unpin for ScriptLeaf
impl UnwindSafe for ScriptLeaf
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