trait MmrHasher {
type Word: Copy + PartialEq;
// Required methods
fn from_b256(x: &B256) -> Self::Word;
fn hash_pair(left: &Self::Word, right: &Self::Word) -> Self::Word;
fn leaf_from_header_hash(header_hash: &B256) -> Self::Word;
fn mmr_root(elements_count: u128, bag: &Self::Word) -> Self::Word;
// Provided method
fn bag_peaks(peaks: &[Self::Word]) -> Self::Word { ... }
}Required Associated Types§
Required Methods§
Sourcefn from_b256(x: &B256) -> Self::Word
fn from_b256(x: &B256) -> Self::Word
Convert a 32-byte value from proofs into the internal word type.
Sourcefn hash_pair(left: &Self::Word, right: &Self::Word) -> Self::Word
fn hash_pair(left: &Self::Word, right: &Self::Word) -> Self::Word
Hash an ordered pair (left, right).
Sourcefn leaf_from_header_hash(header_hash: &B256) -> Self::Word
fn leaf_from_header_hash(header_hash: &B256) -> Self::Word
Compute the leaf from the raw header hash.
Provided Methods§
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.