pub trait SessionStore:
Send
+ Sync
+ 'static {
// Required methods
fn load(&self, id: &str) -> BoxFuture<Option<BTreeMap<String, Value>>>;
fn save(
&self,
id: &str,
data: BTreeMap<String, Value>,
ttl: Duration,
) -> BoxFuture<()>;
fn destroy(&self, id: &str) -> BoxFuture<()>;
}Expand description
Session storage backend.
Required Methods§
fn load(&self, id: &str) -> BoxFuture<Option<BTreeMap<String, Value>>>
fn save( &self, id: &str, data: BTreeMap<String, Value>, ttl: Duration, ) -> BoxFuture<()>
fn destroy(&self, id: &str) -> BoxFuture<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".