Skip to main content

SessionStore

Trait SessionStore 

Source
pub trait SessionStore: Send + Sync {
    // Required methods
    fn load(&self) -> Result<Option<Session>>;
    fn save(&self, session: &Session) -> Result<()>;
    fn clear(&self) -> Result<()>;
}
Expand description

Persistence for a Session. Implementations decide where (file, keyring, Android secure storage). All methods are synchronous and cheap.

Required Methods§

Source

fn load(&self) -> Result<Option<Session>>

Source

fn save(&self, session: &Session) -> Result<()>

Source

fn clear(&self) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§