Trait poem::session::SessionStorage[][src]

pub trait SessionStorage: Send + Sync {
    fn load_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, String>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn update_session<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        entries: &'life2 BTreeMap<String, String>,
        expires: Option<Duration>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn remove_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
This is supported on crate feature session only.
Expand description

Represents a back-end session storage.

Required methods

Load session entries.

Insert or update a session.

Remove a session by session id.

Implementors