Skip to main content

SessionStore

Trait SessionStore 

Source
pub trait SessionStore: Send + Sync {
    // Required methods
    fn get_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Session, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn put_session<'life0, 'async_trait>(
        &'life0 self,
        session: Session,
    ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_session<'life0, 'async_trait>(
        &'life0 self,
        session: Session,
    ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_events<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        event_types: Option<&'life2 [EventType]>,
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn put_event<'life0, 'async_trait>(
        &'life0 self,
        event: SessionEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn put_snapshot<'life0, 'async_trait>(
        &'life0 self,
        snapshot: ReplaySnapshot,
    ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_snapshot<'life0, 'life1, 'async_trait>(
        &'life0 self,
        snapshot_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ReplaySnapshot, MemoryError>> + 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, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Session, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn update_session<'life0, 'async_trait>( &'life0 self, session: Session, ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_events<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, event_types: Option<&'life2 [EventType]>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn put_event<'life0, 'async_trait>( &'life0 self, event: SessionEvent, ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn put_snapshot<'life0, 'async_trait>( &'life0 self, snapshot: ReplaySnapshot, ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, snapshot_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ReplaySnapshot, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§