pub trait ReadonlyState: Send + Sync {
// Required methods
fn get(&self, key: &str) -> Result<Value, SessionError>;
fn all(&self) -> Vec<(String, Value)>;
}Expand description
A read-only view of a key-value store of JSON values.
Required Methods§
Sourcefn get(&self, key: &str) -> Result<Value, SessionError>
fn get(&self, key: &str) -> Result<Value, SessionError>
The value for key; SessionError::StateKeyNotExist if absent.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".