[−][src]Trait async_session::SessionStore
An async session backend.
Associated Types
type Error
The type of error that can occur when storing and loading errors.
Required methods
fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
jar: &'life1 CookieJar
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
jar: &'life1 CookieJar
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get a session from the storage backend.
The input should usually be the content of a cookie. This will then be parsed by the session middleware into a valid session.
fn store_session<'life0, 'life1, 'async_trait>(
&'life0 mut self,
session: Session,
jar: &'life1 mut CookieJar
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
session: Session,
jar: &'life1 mut CookieJar
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Store a session on the storage backend.
This method should return a stringified representation of the session so that it can be sent back to the client through a cookie.
Implementors
impl SessionStore for MemoryStore
[src]
type Error = Error
The type of error that can occur when storing and loading errors.
fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
jar: &'life1 CookieJar
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
jar: &'life1 CookieJar
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get a session from the storage backend.
fn store_session<'life0, 'life1, 'async_trait>(
&'life0 mut self,
sess: Session,
jar: &'life1 mut CookieJar
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
sess: Session,
jar: &'life1 mut CookieJar
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Store a session on the storage backend.
The data inside the session will be url-encoded so it can be stored inside a cookie.