Trait sp_trie::KeyFunction

source ·
pub trait KeyFunction<H>where
    H: Hasher,{
    type Key: Send + Sync + Clone + Hash + Eq;

    // Required method
    fn key(hash: &<H as Hasher>::Out, prefix: (&[u8], Option<u8>)) -> Self::Key;
}
Expand description

Various re-exports from the memory-db crate.

Required Associated Types§

source

type Key: Send + Sync + Clone + Hash + Eq

Required Methods§

source

fn key(hash: &<H as Hasher>::Out, prefix: (&[u8], Option<u8>)) -> Self::Key

Implementors§

source§

impl<H> KeyFunction<H> for LegacyPrefixedKey<H>where H: Hasher,

§

type Key = Vec<u8, Global>

source§

impl<H> KeyFunction<H> for HashKey<H>where H: Hasher,

§

type Key = <H as Hasher>::Out

source§

impl<H> KeyFunction<H> for PrefixedKey<H>where H: Hasher,

§

type Key = Vec<u8, Global>