[−][src]Trait reign_router::middleware::session::SessionBackend
Required methods
fn persist_session<'a>(
&'a self,
identifier: &'a str,
content: &'a [u8]
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
&'a self,
identifier: &'a str,
content: &'a [u8]
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
Persists a session, either creating a new session or updating an existing session.
fn read_session<'a>(
&'a self,
identifier: &'a str
) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'a>>
&'a self,
identifier: &'a str
) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'a>>
Retrieves a session from the underlying storage.
The returned future will resolve to an Option<Vec<u8>>
on success, where a value of
None
indicates that the session is not available for use and a new session should be
established.
fn drop_session<'a>(
&'a self,
identifier: &'a str
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>
&'a self,
identifier: &'a str
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>
Drops a session from the underlying storage.