pub trait HashDBRef<H, T> where
    H: Hasher
{ 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

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

Check for the existance of a hash-key.

Implementors

impl<H, KF, T, M> HashDBRef<H, T> for MemoryDB<H, KF, T, M> where
    H: KeyHasher,
    T: Default + PartialEq<T> + for<'a> From<&'a [u8]> + Clone + Send + Sync,
    KF: KeyFunction<H> + Send + Sync,
    M: MemTracker<T> + Send + Sync

impl<'a, DB, H, T> HashDBRef<H, T> for KeySpacedDB<'a, DB, H> where
    DB: HashDBRef<H, T>,
    H: Hasher,
    T: From<&'static [u8]>,