Struct ockam::LmdbStorage
source · pub struct LmdbStorage {
pub env: Arc<Environment>,
pub map: Database,
}
Expand description
Storage using the LMDB database
Fields§
§env: Arc<Environment>
lmdb da
map: Database
lmdb database file
Implementations§
Trait Implementations§
source§impl Clone for LmdbStorage
impl Clone for LmdbStorage
source§fn clone(&self) -> LmdbStorage
fn clone(&self) -> LmdbStorage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LmdbStorage
impl Debug for LmdbStorage
source§impl PolicyStorage for LmdbStorage
impl PolicyStorage for LmdbStorage
fn get_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, r: &'life1 Resource, a: &'life2 Action ) -> Pin<Box<dyn Future<Output = Result<Option<Expr>, Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, LmdbStorage: 'async_trait,
fn set_policy<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, r: &'life1 Resource, a: &'life2 Action, c: &'life3 Expr ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, LmdbStorage: 'async_trait,
fn del_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, r: &'life1 Resource, a: &'life2 Action ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, LmdbStorage: 'async_trait,
fn policies<'life0, 'life1, 'async_trait>( &'life0 self, r: &'life1 Resource ) -> Pin<Box<dyn Future<Output = Result<Vec<(Action, Expr)>, Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, LmdbStorage: 'async_trait,
source§impl Storage for LmdbStorage
impl Storage for LmdbStorage
source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LmdbStorage: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, LmdbStorage: 'async_trait,
Get entry
source§fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
key: String,
val: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
LmdbStorage: 'async_trait,
fn set<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, key: String, val: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, LmdbStorage: 'async_trait,
Set entry
source§fn del<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
LmdbStorage: 'async_trait,
fn del<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, LmdbStorage: 'async_trait,
Delete entry
source§fn keys<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
LmdbStorage: 'async_trait,
fn keys<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, LmdbStorage: 'async_trait,
List all keys of a given “type”. TODO: we shouldn’t store different things on a single
store.
Auto Trait Implementations§
impl RefUnwindSafe for LmdbStorage
impl Send for LmdbStorage
impl Sync for LmdbStorage
impl Unpin for LmdbStorage
impl UnwindSafe for LmdbStorage
Blanket Implementations§
source§impl<D> AsyncTryClone for Dwhere
D: Clone + Sync,
impl<D> AsyncTryClone for Dwhere D: Clone + Sync,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more