pub trait DocumentStore: Send + Sync {
// Required methods
fn read(&self) -> Result<Option<Value>, String>;
fn write(&self, document: &Value) -> Result<(), String>;
}Required Methods§
Sourcefn read(&self) -> Result<Option<Value>, String>
fn read(&self) -> Result<Option<Value>, String>
The stored document, or None before the first write.
fn write(&self, document: &Value) -> Result<(), String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".