KVStoreDatabase

Trait KVStoreDatabase 

Source
pub trait KVStoreDatabase {
    type Err: Into<Error> + From<Error>;

    // Required methods
    fn kv_read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        primary_namespace: &'life1 str,
        secondary_namespace: &'life2 str,
        key: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn kv_list<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        primary_namespace: &'life1 str,
        secondary_namespace: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Key-Value Store Database trait

Required Associated Types§

Source

type Err: Into<Error> + From<Error>

KV Store Database Error

Required Methods§

Source

fn kv_read<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Read value from key-value store

Source

fn kv_list<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List keys in a namespace

Implementors§