Struct cask::Cask
[−]
[src]
pub struct Cask { /* fields omitted */ }
An handle to a Cask
database.
This handle can be "cheaply" cloned and safely shared between threads. Cask
s cannot be used
concurrently by separate processes and this is ensured by using a file lock in the Cask
dir.
Methods
impl Cask
[src]
fn open(path: &str, options: CaskOptions) -> Result<Cask>
Opens/creates a new Cask
.
fn compact(&self) -> Result<()>
Trigger Cask
log compaction.
fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<Vec<u8>>>
Returns the value corresponding to the key, if any.
fn put<K: Into<Vec<u8>>, V: AsRef<[u8]>>(&self, key: K, value: V) -> Result<()>
Inserts a key-value pair into the map.
fn delete<K: AsRef<[u8]>>(&self, key: K) -> Result<()>
Removes a key from the map.
Trait Implementations
impl Clone for Cask
[src]
fn clone(&self) -> Cask
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more