hash_db

Trait 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>