Trait DatabaseHandle

Source
pub trait DatabaseHandle {
    // Required method
    fn get<'a>(&'a self, key: H256) -> Option<&'a [u8]>;

    // Provided method
    fn get_with_error<'a>(&'a self, key: H256) -> Result<&'a [u8], Error> { ... }
}
Expand description

An immutable database handle.

Required Methods§

Source

fn get<'a>(&'a self, key: H256) -> Option<&'a [u8]>

Get a raw value from the database.

Provided Methods§

Source

fn get_with_error<'a>(&'a self, key: H256) -> Result<&'a [u8], Error>

Implementations on Foreign Types§

Source§

impl<'a> DatabaseHandle for &'a HashMap<H256, Vec<u8>>

Source§

fn get(&self, hash: H256) -> Option<&[u8]>

Implementors§