pub struct MerkleTree<B: IsMerkleTreeBackend> {
pub root: B::Node,
/* private fields */
}Expand description
The struct for the Merkle tree, consisting of the root and the nodes.
A typical tree would look like this
root
/
leaf 12 leaf 34
/ \ /
leaf 1 leaf 2 leaf 3 leaf 4
The bottom leafs correspond to the hashes of the elements, while each upper
layer contains the hash of the concatenation of the daughter nodes.
Fields§
§root: B::NodeImplementations§
Source§impl<B> MerkleTree<B>where
B: IsMerkleTreeBackend,
impl<B> MerkleTree<B>where
B: IsMerkleTreeBackend,
Trait Implementations§
Source§impl<B: Clone + IsMerkleTreeBackend> Clone for MerkleTree<B>
impl<B: Clone + IsMerkleTreeBackend> Clone for MerkleTree<B>
Source§fn clone(&self) -> MerkleTree<B>
fn clone(&self) -> MerkleTree<B>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<B> Freeze for MerkleTree<B>
impl<B> RefUnwindSafe for MerkleTree<B>
impl<B> Send for MerkleTree<B>
impl<B> Sync for MerkleTree<B>
impl<B> Unpin for MerkleTree<B>
impl<B> UnwindSafe for MerkleTree<B>
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