pub struct TapNodeHash(pub [u8; 32]);Expand description
TapBranch/TapNode hash
Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl TapNodeHash
impl TapNodeHash
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Create from raw bytes
Sourcepub fn from_children(left: &TapNodeHash, right: &TapNodeHash) -> Self
pub fn from_children(left: &TapNodeHash, right: &TapNodeHash) -> Self
Compute TapBranch hash from two child hashes Children are sorted lexicographically before hashing
Sourcepub fn from_leaf(leaf: TapLeafHash) -> Self
pub fn from_leaf(leaf: TapLeafHash) -> Self
Create from a leaf hash
Trait Implementations§
Source§impl AsRef<[u8]> for TapNodeHash
impl AsRef<[u8]> for TapNodeHash
Source§impl Clone for TapNodeHash
impl Clone for TapNodeHash
Source§fn clone(&self) -> TapNodeHash
fn clone(&self) -> TapNodeHash
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TapNodeHash
Source§impl Debug for TapNodeHash
impl Debug for TapNodeHash
impl Eq for TapNodeHash
Source§impl From<TapLeafHash> for TapNodeHash
impl From<TapLeafHash> for TapNodeHash
Source§fn from(leaf: TapLeafHash) -> Self
fn from(leaf: TapLeafHash) -> Self
Converts to this type from the input type.
Source§impl Hash for TapNodeHash
impl Hash for TapNodeHash
Source§impl PartialEq for TapNodeHash
impl PartialEq for TapNodeHash
Source§fn eq(&self, other: &TapNodeHash) -> bool
fn eq(&self, other: &TapNodeHash) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TapNodeHash
Auto Trait Implementations§
impl Freeze for TapNodeHash
impl RefUnwindSafe for TapNodeHash
impl Send for TapNodeHash
impl Sync for TapNodeHash
impl Unpin for TapNodeHash
impl UnsafeUnpin for TapNodeHash
impl UnwindSafe for TapNodeHash
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)