Struct bitcoin::util::taproot::TaprootMerkleBranch
source · pub struct TaprootMerkleBranch(/* private fields */);
Expand description
The merkle proof for inclusion of a tree in a taptree hash.
Implementations§
source§impl TaprootMerkleBranch
impl TaprootMerkleBranch
sourcepub fn from_slice(sl: &[u8]) -> Result<Self, TaprootError>
pub fn from_slice(sl: &[u8]) -> Result<Self, TaprootError>
Creates a merkle proof from raw data representing a list of hashes.
sourcepub fn from_inner(inner: Vec<Hash>) -> Result<Self, TaprootError>
👎Deprecated since 0.29.0: use try_from instead
pub fn from_inner(inner: Vec<Hash>) -> Result<Self, TaprootError>
Creates a merkle proof from list of hashes.
Errors
If inner proof length is more than TAPROOT_CONTROL_MAX_NODE_COUNT
(128).
sourcepub fn into_inner(self) -> Vec<Hash>
pub fn into_inner(self) -> Vec<Hash>
Returns the inner list of hashes.
Trait Implementations§
source§impl Clone for TaprootMerkleBranch
impl Clone for TaprootMerkleBranch
source§fn clone(&self) -> TaprootMerkleBranch
fn clone(&self) -> TaprootMerkleBranch
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 moresource§impl Debug for TaprootMerkleBranch
impl Debug for TaprootMerkleBranch
source§impl Default for TaprootMerkleBranch
impl Default for TaprootMerkleBranch
source§fn default() -> TaprootMerkleBranch
fn default() -> TaprootMerkleBranch
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TaprootMerkleBranch
impl<'de> Deserialize<'de> for TaprootMerkleBranch
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 TaprootMerkleBranch
impl Hash for TaprootMerkleBranch
source§impl Ord for TaprootMerkleBranch
impl Ord for TaprootMerkleBranch
source§fn cmp(&self, other: &TaprootMerkleBranch) -> Ordering
fn cmp(&self, other: &TaprootMerkleBranch) -> 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<TaprootMerkleBranch> for TaprootMerkleBranch
impl PartialEq<TaprootMerkleBranch> for TaprootMerkleBranch
source§fn eq(&self, other: &TaprootMerkleBranch) -> bool
fn eq(&self, other: &TaprootMerkleBranch) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<TaprootMerkleBranch> for TaprootMerkleBranch
impl PartialOrd<TaprootMerkleBranch> for TaprootMerkleBranch
source§fn partial_cmp(&self, other: &TaprootMerkleBranch) -> Option<Ordering>
fn partial_cmp(&self, other: &TaprootMerkleBranch) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for TaprootMerkleBranch
impl Serialize for TaprootMerkleBranch
source§impl TryFrom<&[Hash]> for TaprootMerkleBranch
impl TryFrom<&[Hash]> for TaprootMerkleBranch
impl Eq for TaprootMerkleBranch
impl StructuralEq for TaprootMerkleBranch
impl StructuralPartialEq for TaprootMerkleBranch
Auto Trait Implementations§
impl RefUnwindSafe for TaprootMerkleBranch
impl Send for TaprootMerkleBranch
impl Sync for TaprootMerkleBranch
impl Unpin for TaprootMerkleBranch
impl UnwindSafe for TaprootMerkleBranch
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