pub struct ColdStore { /* private fields */ }Implementations§
Source§impl ColdStore
impl ColdStore
pub fn new(path: &str) -> Result<Self>
pub fn with_config( path: &str, cache_capacity_mb: usize, flush_interval_ms: Option<u64>, mode: ColdStoreMode, ) -> Result<Self>
pub fn get(&self, key: &str) -> Result<Option<Vec<u8>>>
pub fn set(&self, key: String, value: Vec<u8>) -> Result<()>
pub fn delete(&self, key: &str) -> Result<()>
pub fn scan(&self) -> impl Iterator<Item = Result<(String, Vec<u8>)>> + '_
pub fn scan_prefix( &self, prefix: &str, ) -> impl Iterator<Item = Result<(String, Vec<u8>)>> + '_
pub fn batch_set(&self, pairs: Vec<(String, Vec<u8>)>) -> Result<()>
pub fn compact(&self) -> Result<()>
pub fn get_stats(&self) -> Result<ColdStoreStats>
pub fn estimated_size(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColdStore
impl !RefUnwindSafe for ColdStore
impl Send for ColdStore
impl Sync for ColdStore
impl Unpin for ColdStore
impl !UnwindSafe for ColdStore
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