Trait HashDBRef

Source
pub trait HashDBRef<H, T>
where H: Hasher,
{ // Required methods fn get( &self, key: &<H as Hasher>::Out, prefix: (&[u8], Option<u8>), ) -> Option<T>; fn contains( &self, key: &<H as Hasher>::Out, prefix: (&[u8], Option<u8>), ) -> bool; }
Expand description

Trait for immutable reference of HashDB.

Required Methods§

Source

fn get( &self, key: &<H as Hasher>::Out, prefix: (&[u8], Option<u8>), ) -> 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 as Hasher>::Out, prefix: (&[u8], Option<u8>), ) -> bool

Check for the existance of a hash-key.

Implementors§

Source§

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

Source§

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