Struct TapTree
pub struct TapTree(/* private fields */);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.
pub fn root_hash(&self) -> TapNodeHash
pub fn root_hash(&self) -> TapNodeHash
Returns the root TapNodeHash of this tree.
Trait Implementations§
§impl<'de> Deserialize<'de> for TapTree
impl<'de> Deserialize<'de> for TapTree
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TapTree, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TapTree, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for TapTree
impl Serialize for TapTree
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§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 IncompleteBuilderError
error with the content of incomplete builder instance.
§type Error = IncompleteBuilderError
type Error = IncompleteBuilderError
The type returned in the event of a conversion error.
impl Eq for TapTree
impl StructuralPartialEq for TapTree
Auto Trait Implementations§
impl Freeze for TapTree
impl RefUnwindSafe for TapTree
impl Send for TapTree
impl Sync for TapTree
impl Unpin for TapTree
impl UnwindSafe for TapTree
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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
§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
Compare self to
key and return true if they are equal.§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request