pub struct BitCask { /* private fields */ }
Implementations§
Source§impl BitCask
impl BitCask
pub fn new<T: Into<PathBuf>>(data_dir: T) -> Result<Self, BitCaskError>
Sourcepub fn compact_to_new_dir<T: Into<PathBuf>>(
&self,
data_dir: T,
) -> Result<(), BitCaskError>
pub fn compact_to_new_dir<T: Into<PathBuf>>( &self, data_dir: T, ) -> Result<(), BitCaskError>
WARNING: this method is a blocking call, it will block the current thread until the compaction is finished. If you’re using this method in an async context, you should spawn a blocking worker thread to call this method.
Trait Implementations§
Source§impl KVStorage for BitCask
impl KVStorage for BitCask
fn get(&self, key: &Key) -> Option<Value>
fn put_with_option( &mut self, key: &Key, value: &Value, option: Option<PutOption>, ) -> Result<(), BitCaskError>
fn delete(&mut self, key: &Key) -> Result<(), BitCaskError>
fn size(&self) -> usize
fn put(&mut self, key: &Key, value: &Value) -> Result<(), BitCaskError>
Auto Trait Implementations§
impl Freeze for BitCask
impl RefUnwindSafe for BitCask
impl Send for BitCask
impl Sync for BitCask
impl Unpin for BitCask
impl UnwindSafe for BitCask
Blanket Implementations§
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