pub trait Database {
// Required methods
fn new(dbpath: &str) -> Self;
fn get(&mut self, key: &[u8]) -> Result<Option<Vec<u8>>>;
fn put(&mut self, key: &[u8], value: Vec<u8>) -> Result<()>;
fn delete(&mut self, key: &[u8]) -> Result<()>;
fn init_batch(&mut self) -> Result<()>;
fn finish_batch(&mut self) -> Result<()>;
}
Expand description
A trait defining databases used for monotree
.