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<Option<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.
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 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,
Insert or update a session.