Trait KeyHasher
pub trait KeyHasher:
Default
+ Clone
+ Send
+ Sync
+ 'static {
// Required method
fn hash_key<T>(bytes: T) -> FixedBytes<32>
where T: AsRef<[u8]>;
}
Available on crate feature
trie
only.Expand description
Trait for hashing keys in state.
Required Methods§
fn hash_key<T>(bytes: T) -> FixedBytes<32>
fn hash_key<T>(bytes: T) -> FixedBytes<32>
Hashes the given bytes into a 256-bit 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.