Trait async_memorydb::Kvdb

source ·
pub trait Kvdb {
    // Required methods
    fn scan_keys<'life0, 'life1, 'async_trait>(
        &'life0 self,
        filter: &'life1 (dyn Fn(&SmolStr) -> bool + Send + Sync + 'static)
    ) -> Pin<Box<dyn Future<Output = Vec<SmolStr, Global>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_many<'life0, 'async_trait>(
        &'life0 self,
        keys: Vec<SmolStr, Global>
    ) -> Pin<Box<dyn Future<Output = HashMap<SmolStr, Bytes, RandomState>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn set_many<'life0, 'async_trait>(
        &'life0 self,
        data: HashMap<SmolStr, Bytes, RandomState>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn delete_many<'life0, 'async_trait>(
        &'life0 self,
        keys: Vec<SmolStr, Global>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn delete_all<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided methods
    fn get<'life0, 'async_trait>(
        &'life0 self,
        key: SmolStr
    ) -> Pin<Box<dyn Future<Output = Option<Bytes>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn set<'life0, 'async_trait>(
        &'life0 self,
        key: SmolStr,
        value: Bytes
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn delete<'life0, 'async_trait>(
        &'life0 self,
        key: SmolStr
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
}

Required Methods§

source

fn scan_keys<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 (dyn Fn(&SmolStr) -> bool + Send + Sync + 'static) ) -> Pin<Box<dyn Future<Output = Vec<SmolStr, Global>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn get_many<'life0, 'async_trait>( &'life0 self, keys: Vec<SmolStr, Global> ) -> Pin<Box<dyn Future<Output = HashMap<SmolStr, Bytes, RandomState>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

source

fn set_many<'life0, 'async_trait>( &'life0 self, data: HashMap<SmolStr, Bytes, RandomState> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

source

fn delete_many<'life0, 'async_trait>( &'life0 self, keys: Vec<SmolStr, Global> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

source

fn delete_all<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Provided Methods§

source

fn get<'life0, 'async_trait>( &'life0 self, key: SmolStr ) -> Pin<Box<dyn Future<Output = Option<Bytes>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: Sync + 'async_trait,

source

fn set<'life0, 'async_trait>( &'life0 self, key: SmolStr, value: Bytes ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: Sync + 'async_trait,

source

fn delete<'life0, 'async_trait>( &'life0 self, key: SmolStr ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: Sync + 'async_trait,

Implementors§