Trait poem::session::SessionStorage
source · pub trait SessionStorage: Send + Sync {
// Required methods
fn load_session<'a>(
&'a self,
session_id: &'a str
) -> impl Future<Output = Result<Option<BTreeMap<String, Value>>>> + Send + 'a;
fn update_session<'a>(
&'a self,
session_id: &'a str,
entries: &'a BTreeMap<String, Value>,
expires: Option<Duration>
) -> impl Future<Output = Result<()>> + Send + 'a;
fn remove_session<'a>(
&'a self,
session_id: &'a str
) -> impl Future<Output = Result<()>> + Send + 'a;
}
Available on crate feature
session
only.Expand description
Represents a back-end session storage.
Required Methods§
sourcefn load_session<'a>(
&'a self,
session_id: &'a str
) -> impl Future<Output = Result<Option<BTreeMap<String, Value>>>> + Send + 'a
fn load_session<'a>( &'a self, session_id: &'a str ) -> impl Future<Output = Result<Option<BTreeMap<String, Value>>>> + Send + 'a
Load session entries.
Object Safety§
This trait is not object safe.