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