pub trait MerkleHash {
// Required methods
fn empty_hash(&mut self) -> Hash;
fn leaf_hash(&mut self, bytes: &[u8]) -> Hash;
fn inner_hash(&mut self, left: Hash, right: Hash) -> Hash;
// Provided method
fn hash_byte_vectors(&mut self, byte_vecs: &[impl AsRef<[u8]>]) -> Hash { ... }
}
Expand description
Implementation of Merkle tree hashing for Tendermint.
Required Methods§
fn empty_hash(&mut self) -> Hash
fn leaf_hash(&mut self, bytes: &[u8]) -> Hash
fn inner_hash(&mut self, left: Hash, right: Hash) -> Hash
Provided Methods§
fn hash_byte_vectors(&mut self, byte_vecs: &[impl AsRef<[u8]>]) -> Hash
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.