pub trait Store {
// Required methods
fn load(&self) -> Option<SessionState>;
fn save(&self, state: &SessionState) -> Result<()>;
}Expand description
A place to load and save SessionState. MemStore keeps
nothing (a fresh session each run); a file store (native) or a
browser store (wasm, localStorage) persists. The caller keys the
store by the session’s source identity.
Required Methods§
fn load(&self) -> Option<SessionState>
fn save(&self, state: &SessionState) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".