pub trait SessionStateComponent: Send + Sync {
// Required methods
fn key(&self) -> &str;
fn save(&self) -> Value;
fn load(&self, state: Value) -> Result<()>;
}Expand description
Handles session persistence for a module’s state.
Modules that need to persist state across sessions should return
an implementation of this trait from Module::session_state().