Skip to main content

SessionStore

Trait SessionStore 

Source
pub trait SessionStore<P>: Send + Sync
where P: Send,
{ // Required methods fn load<'a>( &'a self, id: &'a SessionId, ) -> BoxFuture<'a, SoapResult<Option<Session<P>>>>; fn save(&self, session: Session<P>) -> BoxFuture<'_, SoapResult<()>>; fn delete<'a>(&'a self, id: &'a SessionId) -> BoxFuture<'a, SoapResult<()>>; }
Expand description

Persistence port for server-side sessions.

Required Methods§

Source

fn load<'a>( &'a self, id: &'a SessionId, ) -> BoxFuture<'a, SoapResult<Option<Session<P>>>>

Loads a session when it exists.

Source

fn save(&self, session: Session<P>) -> BoxFuture<'_, SoapResult<()>>

Inserts or replaces a session.

Source

fn delete<'a>(&'a self, id: &'a SessionId) -> BoxFuture<'a, SoapResult<()>>

Removes a session. Missing sessions are successful no-ops.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§