pub struct TapTree(_);Expand description
Taproot Tree representing a complete binary tree without any hidden nodes.
This is in contrast to NodeInfo, which allows hidden nodes.
The implementations for Eq, PartialEq and Hash compare the merkle root of the tree
Implementations§
§impl TapTree
impl TapTree
pub fn into_node_info(self) -> NodeInfo
pub fn into_node_info(self) -> NodeInfo
Gets the inner NodeInfo of this tree root.
pub fn script_leaves(&self) -> ScriptLeaves<'_> ⓘ
pub fn script_leaves(&self) -> ScriptLeaves<'_> ⓘ
Returns [TapTreeIter<'_>] iterator for a taproot script tree, operating in DFS order over
tree ScriptLeafs.
Trait Implementations§
§impl TryFrom<NodeInfo> for TapTree
impl TryFrom<NodeInfo> for TapTree
§impl TryFrom<TaprootBuilder> for TapTree
impl TryFrom<TaprootBuilder> for TapTree
§fn try_from(
builder: TaprootBuilder
) -> Result<TapTree, <TapTree as TryFrom<TaprootBuilder>>::Error>
fn try_from( builder: TaprootBuilder ) -> Result<TapTree, <TapTree as TryFrom<TaprootBuilder>>::Error>
Constructs TapTree from a TaprootBuilder if it is complete binary tree.
Returns
A TapTree iff the builder is complete, otherwise return IncompleteBuilder
error with the content of incomplete builder instance.
§type Error = IncompleteBuilder
type Error = IncompleteBuilder
The type returned in the event of a conversion error.
impl Eq for TapTree
impl StructuralEq for TapTree
impl StructuralPartialEq for TapTree
Auto Trait Implementations§
impl RefUnwindSafe for TapTree
impl Send for TapTree
impl Sync for TapTree
impl Unpin for TapTree
impl UnwindSafe for TapTree
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.