LMDBStorage

Struct LMDBStorage 

Source
pub struct LMDBStorage { /* private fields */ }

Implementations§

Source§

impl LMDBStorage

Source

pub fn new( db_path: &str, mode: StorageMode, max_read_counter_reopen: Option<u64>, ) -> LMDBStorage

Source

pub fn open(&mut self, storage: StorageId)

Trait Implementations§

Source§

impl Storage for LMDBStorage

Source§

fn get_individual( &mut self, storage: StorageId, uri: &str, iraw: &mut Individual, ) -> StorageResult<()>

Source§

fn get_value(&mut self, storage: StorageId, key: &str) -> StorageResult<String>

Source§

fn get_raw_value( &mut self, storage: StorageId, key: &str, ) -> StorageResult<Vec<u8>>

Source§

fn put_value( &mut self, storage: StorageId, key: &str, val: &str, ) -> StorageResult<()>

Source§

fn put_raw_value( &mut self, storage: StorageId, key: &str, val: Vec<u8>, ) -> StorageResult<()>

Source§

fn remove_value(&mut self, storage: StorageId, key: &str) -> StorageResult<()>

Source§

fn count(&mut self, storage: StorageId) -> StorageResult<usize>

Source§

fn get_individual_from_db( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>

👎Deprecated since 0.1.0: Use get_individual instead
Source§

fn get_v(&mut self, storage: StorageId, key: &str) -> Option<String>

👎Deprecated since 0.1.0: Use get_value instead
Source§

fn get_raw(&mut self, storage: StorageId, key: &str) -> Vec<u8>

👎Deprecated since 0.1.0: Use get_raw_value instead
Source§

fn put_kv(&mut self, storage: StorageId, key: &str, val: &str) -> bool

👎Deprecated since 0.1.0: Use put_value instead
Source§

fn put_kv_raw(&mut self, storage: StorageId, key: &str, val: Vec<u8>) -> bool

👎Deprecated since 0.1.0: Use put_raw_value instead
Source§

fn remove(&mut self, storage: StorageId, key: &str) -> bool

👎Deprecated since 0.1.0: Use remove_value instead

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.