Abstract database behind generic interface and implement alternative drivers #322
1 changed files with 2 additions and 2 deletions
|
@ -18,10 +18,10 @@ use err_derive::Error;
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Db(pub(crate) Arc<dyn IDb>);
|
pub struct Db(pub(crate) Arc<dyn IDb>);
|
||||||
|
|
||||||
pub struct Transaction<'a>(pub(crate) &'a mut dyn ITx);
|
pub struct Transaction<'a>(&'a mut dyn ITx);
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Tree(pub(crate) Arc<dyn IDb>, pub(crate) usize);
|
pub struct Tree(Arc<dyn IDb>, usize);
|
||||||
|
|
||||||
pub type Value = Vec<u8>;
|
pub type Value = Vec<u8>;
|
||||||
pub type ValueIter<'a> = Box<dyn std::iter::Iterator<Item = Result<(Value, Value)>> + 'a>;
|
pub type ValueIter<'a> = Box<dyn std::iter::Iterator<Item = Result<(Value, Value)>> + 'a>;
|
||||||
|
|
Loading…
Reference in a new issue