Trait hash_db::HashDBRef

source ·
pub trait HashDBRef<H: Hasher, T> {
    // Required methods
    fn get(&self, key: &H::Out, prefix: Prefix<'_>) -> Option<T>;
    fn contains(&self, key: &H::Out, prefix: Prefix<'_>) -> bool;
}
Expand description

Trait for immutable reference of HashDB.

Required Methods§

source

fn get(&self, key: &H::Out, prefix: Prefix<'_>) -> Option<T>

Look up a given hash into the bytes that hash to it, returning None if the hash is not known.

source

fn contains(&self, key: &H::Out, prefix: Prefix<'_>) -> bool

Check for the existance of a hash-key.

Implementors§

source§

impl<'a, H: Hasher, T> HashDBRef<H, T> for &'a dyn HashDB<H, T>

source§

impl<'a, H: Hasher, T> HashDBRef<H, T> for &'a mut dyn HashDB<H, T>