Trait Database

Source
pub trait Database {
    // Required methods
    fn set_key<'life0, 'async_trait>(
        &'life0 mut self,
        k: impl 'async_trait + DatabaseKey,
        v: Bytes,
    ) -> Pin<Box<dyn Future<Output = BotnetResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_key<'life0, 'async_trait>(
        &'life0 self,
        k: impl 'async_trait + DatabaseKey,
    ) -> Pin<Box<dyn Future<Output = BotnetResult<Option<Bytes>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_bytes<'life0, 'async_trait>(
        &'life0 self,
        b: Bytes,
        v: Bytes,
    ) -> Pin<Box<dyn Future<Output = BotnetResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_bytes<'life0, 'life1, 'async_trait>(
        &'life0 self,
        k: &'life1 Bytes,
    ) -> Pin<Box<dyn Future<Output = BotnetResult<Option<Bytes>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn set_key<'life0, 'async_trait>( &'life0 mut self, k: impl 'async_trait + DatabaseKey, v: Bytes, ) -> Pin<Box<dyn Future<Output = BotnetResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_key<'life0, 'async_trait>( &'life0 self, k: impl 'async_trait + DatabaseKey, ) -> Pin<Box<dyn Future<Output = BotnetResult<Option<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_bytes<'life0, 'async_trait>( &'life0 self, b: Bytes, v: Bytes, ) -> Pin<Box<dyn Future<Output = BotnetResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, k: &'life1 Bytes, ) -> Pin<Box<dyn Future<Output = BotnetResult<Option<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§