Struct dbc::tapret::TapretRightBranch
source · pub struct TapretRightBranch { /* private fields */ }
Expand description
Rigt-side hashing partner in the taproot script tree, used by
TapretNodePartner::RightBranch
to ensure correct consensus ordering of
the child elements.
Implementations§
source§impl TapretRightBranch
impl TapretRightBranch
sourcepub fn with(a: TapNodeHash, b: TapNodeHash) -> TapretRightBranch
pub fn with(a: TapNodeHash, b: TapNodeHash) -> TapretRightBranch
Constructs TapretRightBranch
by putting a
and b
branches hashes
into the correct consensus order (i.e. lexicographically).
sourcepub fn left_node_hash(self) -> TapNodeHash
pub fn left_node_hash(self) -> TapNodeHash
Returns hash of the left-side child node of the branch (having smaller hash value).
sourcepub fn right_node_hash(self) -> TapNodeHash
pub fn right_node_hash(self) -> TapNodeHash
Returns hash of the right-side child node of the branch (having smaller hash value).
sourcepub fn node_hash(&self) -> TapNodeHash
pub fn node_hash(&self) -> TapNodeHash
Computes node hash of the partner node defined by this proof.
Trait Implementations§
source§impl Clone for TapretRightBranch
impl Clone for TapretRightBranch
source§fn clone(&self) -> TapretRightBranch
fn clone(&self) -> TapretRightBranch
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 TapretRightBranch
impl Debug for TapretRightBranch
source§impl<'de> Deserialize<'de> for TapretRightBranch
impl<'de> Deserialize<'de> for TapretRightBranch
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 Display for TapretRightBranch
impl Display for TapretRightBranch
source§impl Hash for TapretRightBranch
impl Hash for TapretRightBranch
source§impl Ord for TapretRightBranch
impl Ord for TapretRightBranch
source§fn cmp(&self, other: &TapretRightBranch) -> Ordering
fn cmp(&self, other: &TapretRightBranch) -> 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 TapretRightBranch
impl PartialEq for TapretRightBranch
source§fn eq(&self, other: &TapretRightBranch) -> bool
fn eq(&self, other: &TapretRightBranch) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TapretRightBranch
impl PartialOrd for TapretRightBranch
source§fn partial_cmp(&self, other: &TapretRightBranch) -> Option<Ordering>
fn partial_cmp(&self, other: &TapretRightBranch) -> 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 TapretRightBranch
impl Serialize for TapretRightBranch
source§impl StrictDecode for TapretRightBranch
impl StrictDecode for TapretRightBranch
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictDumb for TapretRightBranch
impl StrictDumb for TapretRightBranch
fn strict_dumb() -> Self
source§impl StrictEncode for TapretRightBranch
impl StrictEncode for TapretRightBranch
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictStruct for TapretRightBranch
impl StrictStruct for TapretRightBranch
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for TapretRightBranch
impl StrictType for TapretRightBranch
const STRICT_LIB_NAME: &'static str = LIB_NAME_BPCORE
fn strict_name() -> Option<TypeName>
impl Copy for TapretRightBranch
impl Eq for TapretRightBranch
impl StrictProduct for TapretRightBranch
impl StructuralEq for TapretRightBranch
impl StructuralPartialEq for TapretRightBranch
Auto Trait Implementations§
impl RefUnwindSafe for TapretRightBranch
impl Send for TapretRightBranch
impl Sync for TapretRightBranch
impl Unpin for TapretRightBranch
impl UnwindSafe for TapretRightBranch
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.