pub struct MerkleTree<H, T> { /* private fields */ }
Expand description
A Merkle tree.
Values of this type represent fully constructed Merkle trees. A valid tree either has a single leaf node as the root node, or has a hierarchy of nodes terminating with leaf nodes and with hash-only nodes at levels above leaves.
MerkleTree
hierarchies are immutable: it’s not possible to e.g.
swap out nodes in safe code because doing so would violate
the hash integrity.
Implementations§
Trait Implementations§
Source§impl<H: Hash, T> Hash for MerkleTree<H, T>
impl<H: Hash, T> Hash for MerkleTree<H, T>
Source§impl<H: PartialEq, T> PartialEq for MerkleTree<H, T>
impl<H: PartialEq, T> PartialEq for MerkleTree<H, T>
Source§impl<H, T> Serialize for MerkleTree<H, T>
impl<H, T> Serialize for MerkleTree<H, T>
impl<H: Eq, T> Eq for MerkleTree<H, T>
Auto Trait Implementations§
impl<H, T> Freeze for MerkleTree<H, T>
impl<H, T> RefUnwindSafe for MerkleTree<H, T>where
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Send for MerkleTree<H, T>
impl<H, T> Sync for MerkleTree<H, T>
impl<H, T> Unpin for MerkleTree<H, T>
impl<H, T> UnwindSafe for MerkleTree<H, T>where
H: UnwindSafe,
T: UnwindSafe,
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> 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 more