pub trait SessionCache: Debug {
// Required methods
fn try_load(&self, session_id: &str) -> Result<Option<Session>, CacheError>;
fn save(&self, session: &Session) -> Result<(), CacheError>;
// Provided method
fn load(&self, session_id: &str) -> Result<Session, CacheError> { ... }
}Expand description
Stores cached data specific to a session, such as submission timeouts.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".