Skip to main content

SessionStore

Trait SessionStore 

Source
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§

Source

fn load(&self, id: &str) -> BoxFuture<Option<BTreeMap<String, Value>>>

Source

fn save( &self, id: &str, data: BTreeMap<String, Value>, ttl: Duration, ) -> BoxFuture<()>

Source

fn destroy(&self, id: &str) -> BoxFuture<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§