pub trait SessionStore:
Send
+ Sync
+ 'static {
// Required methods
fn load<'a>(
&'a self,
id: &'a str,
) -> BoxFuture<'a, Option<HashMap<String, String>>>;
fn save<'a>(
&'a self,
id: &'a str,
data: &'a HashMap<String, String>,
ttl: Duration,
) -> BoxFuture<'a, ()>;
fn destroy<'a>(&'a self, id: &'a str) -> BoxFuture<'a, ()>;
fn destroy_user<'a>(
&'a self,
user_id: &'a str,
keep_sid: Option<&'a str>,
) -> BoxFuture<'a, u64>;
}Expand description
Backend for cookie sessions (load/save/destroy + logout-by-user).
Required Methods§
fn load<'a>( &'a self, id: &'a str, ) -> BoxFuture<'a, Option<HashMap<String, String>>>
fn save<'a>( &'a self, id: &'a str, data: &'a HashMap<String, String>, ttl: Duration, ) -> BoxFuture<'a, ()>
fn destroy<'a>(&'a self, id: &'a str) -> BoxFuture<'a, ()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".