Skip to main content

SessionStoreExt

Trait SessionStoreExt 

Source
pub trait SessionStoreExt: SessionStore {
    // Provided methods
    fn get_messages_paginated<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        page_size: u32,
        cursor: Option<MessageCursor>,
    ) -> Pin<Box<dyn Future<Output = Result<MessagePage, SessionStoreError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn archive_session<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        archive_store: &'life2 dyn ArchiveStore,
    ) -> Pin<Box<dyn Future<Output = Result<String, SessionStoreError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: Sync + 'async_trait { ... }
}
Expand description

Extension trait for SessionStore with additional convenience methods

Provided Methods§

Source

fn get_messages_paginated<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, page_size: u32, cursor: Option<MessageCursor>, ) -> Pin<Box<dyn Future<Output = Result<MessagePage, SessionStoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Sync + 'async_trait,

Get messages with pagination support

Source

fn archive_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, archive_store: &'life2 dyn ArchiveStore, ) -> Pin<Box<dyn Future<Output = Result<String, SessionStoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: Sync + 'async_trait,

Archive a completed session

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> SessionStoreExt for T
where T: SessionStore + ?Sized,