pub struct IncrementalHasher { /* private fields */ }
Expand description
An incremental merkle tree hasher
Implementations§
Source§impl IncrementalHasher
impl IncrementalHasher
Sourcepub fn add(&mut self, node: TxMerkleNode)
pub fn add(&mut self, node: TxMerkleNode)
Add a node to the tree
Sourcepub fn finish(self) -> TxMerkleNode
pub fn finish(self) -> TxMerkleNode
Finish hashing the tree and return the root. Will panic if no nodes have been added.
Auto Trait Implementations§
impl Freeze for IncrementalHasher
impl RefUnwindSafe for IncrementalHasher
impl Send for IncrementalHasher
impl Sync for IncrementalHasher
impl Unpin for IncrementalHasher
impl UnwindSafe for IncrementalHasher
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