pub trait HashTreeRoot {
// Required method
fn hash_tree_root<D: Digest<OutputSize = U32>>(&self) -> [u8; 32];
}Expand description
Computes a 32-byte hash tree root for SSZ types.
Generic over the hash function so callers can plug in SHA-256, Blake2b,
etc. Requires OutputSize = U32, i.e. a 32-byte digest.
Required Methods§
Sourcefn hash_tree_root<D: Digest<OutputSize = U32>>(&self) -> [u8; 32]
fn hash_tree_root<D: Digest<OutputSize = U32>>(&self) -> [u8; 32]
Compute the hash tree root using D as the underlying 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.