[−][src]Struct kv::Store
A Store is used to keep data on disk using LMDB
Fields
cfg: Config
The config
field stores the initial configuration values for the given store
Methods
impl Store
[src]
pub fn new(config: Config) -> Result<Store, Error>
[src]
Create a new store with the given configuration
pub fn bucket<'a, K: Key, V: Value<'a>>(
&self,
name: Option<&str>
) -> Result<Bucket<'a, K, V>, Error>
[src]
&self,
name: Option<&str>
) -> Result<Bucket<'a, K, V>, Error>
Get a named bucket
pub fn int_bucket<'a, V: Value<'a>>(
&self,
name: Option<&str>
) -> Result<Bucket<'a, Integer, V>, Error>
[src]
&self,
name: Option<&str>
) -> Result<Bucket<'a, Integer, V>, Error>
Get a named bucket
pub fn with_read_txn<'a, Res, F: FnOnce(&Txn<'a>) -> Result<Res, Error>>(
&'a self,
f: F
) -> Result<Res, Error>
[src]
&'a self,
f: F
) -> Result<Res, Error>
Create a readonly transaction and pass it to the provided function
pub fn with_write_txn<'a, Res, F: FnOnce(&mut Txn<'a>) -> Result<Res, Error>>(
&'a mut self,
f: F
) -> Result<Res, Error>
[src]
&'a mut self,
f: F
) -> Result<Res, Error>
Create a writable transaction and pass it to the provided function
pub fn read_txn(&self) -> Result<Txn, Error>
[src]
Open a readonly transaction
pub fn write_txn(&self) -> Result<Txn, Error>
[src]
Open a writable transaction
pub fn sync(&self, force: bool) -> Result<(), Error>
[src]
Sync data to disk
pub fn stat(&self) -> Result<Stat, Error>
[src]
Get database statistics
Auto Trait Implementations
impl Send for Store
impl Unpin for Store
impl Sync for Store
impl UnwindSafe for Store
impl RefUnwindSafe for Store
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,