Trait hash_db::PlainDBRef

source ·
pub trait PlainDBRef<K, V> {
    // Required methods
    fn get(&self, key: &K) -> Option<V>;
    fn contains(&self, key: &K) -> bool;
}
Expand description

Trait for immutable reference of PlainDB.

Required Methods§

source

fn get(&self, key: &K) -> Option<V>

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: &K) -> bool

Check for the existance of a hash-key.

Implementors§

source§

impl<'a, K, V> PlainDBRef<K, V> for &'a dyn PlainDB<K, V>

source§

impl<'a, K, V> PlainDBRef<K, V> for &'a mut dyn PlainDB<K, V>

impl<H, KF, T> PlainDBRef<<H as Hasher>::Out, T> for MemoryDB<H, KF, T>where H: KeyHasher, T: Default + PartialEq<T> + for<'a> From<&'a [u8]> + Clone + Send + Sync, KF: Send + Sync + KeyFunction<H>, KF::Key: Borrow<[u8]> + for<'a> From<&'a [u8]>,