pub trait State: Send + Sync {
// Required methods
fn get(&self, key: &str) -> Option<Value>;
fn set(&mut self, key: String, value: Value);
fn all(&self) -> HashMap<String, Value>;
}Available on crate feature
sessions only.Expand description
Mutable key-value state store for a session.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".