SessionStore

Trait SessionStore 

Source
pub trait SessionStore: Send + Sync {
    // Required methods
    fn get_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        app_id: &'life1 AppId,
    ) -> Pin<Box<dyn Future<Output = Option<BotContext>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn put_session<'life0, 'async_trait>(
        &'life0 self,
        context: BotContext,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn mark_message_seen<'life0, 'life1, 'async_trait>(
        &'life0 self,
        app_id: &'life1 AppId,
        new_msg_id: i64,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn get_session<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 AppId, ) -> Pin<Box<dyn Future<Output = Option<BotContext>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn mark_message_seen<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 AppId, new_msg_id: i64, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

returns true if this message id is first seen

Implementors§