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