[][src]Struct bhatho::Bhatho

pub struct Bhatho { /* fields omitted */ }

Bhatho database instance

Methods

impl Bhatho[src]

pub fn new(
    config: &BhathoConfig,
    shutdown: Arc<AtomicBool>
) -> Result<Bhatho, String>
[src]

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]

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]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T