Trait frame_support::StorageHasher
source · pub trait StorageHasher: 'static {
type Output: AsRef<[u8]>;
const METADATA: StorageHasherIR;
// Required methods
fn hash(x: &[u8]) -> Self::Output;
fn max_len<K: MaxEncodedLen>() -> usize;
}
Expand description
Hasher to use to hash keys to insert to storage.
Required Associated Types§
Required Associated Constants§
const METADATA: StorageHasherIR
Required Methods§
fn hash(x: &[u8]) -> Self::Output
sourcefn max_len<K: MaxEncodedLen>() -> usize
fn max_len<K: MaxEncodedLen>() -> usize
The max length of the final hash, for the given key type.
Object Safety§
This trait is not object safe.