pub trait StorageBackend: Send + Sync {
// Required methods
fn load(&self) -> Result<BTreeMap<String, String>, String>;
fn write(&self, change: StorageChange);
}Expand description
Where an app’s entries are kept: the platform’s.
Required Methods§
Sourcefn load(&self) -> Result<BTreeMap<String, String>, String>
fn load(&self) -> Result<BTreeMap<String, String>, String>
The entries kept, read once when the app first uses its storage; an error leaves the app with none (logged).
Sourcefn write(&self, change: StorageChange)
fn write(&self, change: StorageChange)
Keeps change. Called on the engine thread: a backend that blocks
writes elsewhere, in order.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".