Skip to main content

KeyValueDriver

Trait KeyValueDriver 

Source
pub trait KeyValueDriver: Send + Sync {
    // Required methods
    fn driver_type(&self) -> DatabaseType;
    fn scan_keys_with_info<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        handle: &'life1 ConnectionHandle,
        db_index: u32,
        pattern: &'life2 str,
        cursor: u64,
        count: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(u64, Vec<KeyEntry>, u64), DriverError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_key_detail<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        handle: &'life1 ConnectionHandle,
        db_index: u32,
        key: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<KeyDetail, DriverError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn driver_type(&self) -> DatabaseType

Source

fn scan_keys_with_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, handle: &'life1 ConnectionHandle, db_index: u32, pattern: &'life2 str, cursor: u64, count: u32, ) -> Pin<Box<dyn Future<Output = Result<(u64, Vec<KeyEntry>, u64), DriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_key_detail<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, handle: &'life1 ConnectionHandle, db_index: u32, key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<KeyDetail, DriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§