[−][src]Struct bhatho::Bhatho
Bhatho database instance
Methods
impl Bhatho
[src]
pub fn new(
config: &BhathoConfig,
shutdown: Arc<AtomicBool>
) -> Result<Bhatho, String>
[src]
config: &BhathoConfig,
shutdown: Arc<AtomicBool>
) -> Result<Bhatho, String>
pub fn get(&self, kv: &KeyVal) -> Result<Option<(Vec<u8>, bool)>, String>
[src]
get the value for a given key
pub fn put(&self, kv: &KeyVal) -> Result<(), String>
[src]
put the key, val pair to DB and Lru Cache
pub fn delete(&self, kv: &KeyVal) -> Result<(), String>
[src]
delete the key-val pair from db and lru cache for a given key
pub fn export_lru_keys(&self, db_name: &[u8]) -> Result<(), String>
[src]
Export all the Keys from LRU Cache to a file path configured in the cache mgr
pub fn backup_db(&self, db_name: &[u8]) -> Result<(), String>
[src]
Trait Implementations
impl Sync for Bhatho
[src]
impl Clone for Bhatho
[src]
fn clone(&self) -> Bhatho
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Send for Bhatho
[src]
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.