pub struct TapTree(_);
Expand description
Taproot Tree representing a finalized TaprootBuilder
(a complete binary tree).
Implementations
sourceimpl TapTree
impl TapTree
sourcepub fn from_builder(builder: TaprootBuilder) -> Result<Self, IncompleteTapTree>
pub fn from_builder(builder: TaprootBuilder) -> Result<Self, IncompleteTapTree>
Constructs TapTree
from a TaprootBuilder
if it is complete binary tree.
Returns
A TapTree
iff the builder
is complete, otherwise return IncompleteTapTree
error with the content of incomplete builder
instance.
sourcepub fn into_builder(self) -> TaprootBuilder
pub fn into_builder(self) -> TaprootBuilder
Converts self into builder TaprootBuilder
. The builder is guaranteed to be finalized.
sourcepub fn to_builder(&self) -> TaprootBuilder
pub fn to_builder(&self) -> TaprootBuilder
Constructs TaprootBuilder
by internally cloning the self
. The builder is guaranteed
to be finalized.
sourcepub fn script_leaves(&self) -> TapTreeIter<'_>
pub fn script_leaves(&self) -> TapTreeIter<'_>
Returns [TapTreeIter
] iterator for a taproot script tree, operating in DFS order over
tree ScriptLeaf
s.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for TapTree
impl<'de> Deserialize<'de> for TapTree
sourcefn 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
sourceimpl Deserialize for TapTree
impl Deserialize for TapTree
sourcefn deserialize(bytes: &[u8]) -> Result<Self, Error>
fn deserialize(bytes: &[u8]) -> Result<Self, Error>
Deserialize a value from raw data.
sourceimpl From<TapTree> for TaprootBuilder
impl From<TapTree> for TaprootBuilder
impl Eq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more