pub trait StorageBackend:
Send
+ Sync
+ 'static {
// Required methods
fn get<P: AsRef<Path>>(&self, path: P) -> Result<Option<Vec<u8>>>;
fn put<P: AsRef<Path>>(&self, path: P, value: &[u8]) -> Result<()>;
fn delete<P: AsRef<Path>>(&self, path: P) -> Result<()>;
fn batch_update<K, V, I>(&self, iter: I) -> Result<()>
where K: AsRef<Path>,
V: AsRef<[u8]>,
I: IntoIterator<Item = (K, Option<V>)>;
}Required Methods§
Sourcefn delete<P: AsRef<Path>>(&self, path: P) -> Result<()>
fn delete<P: AsRef<Path>>(&self, path: P) -> Result<()>
Delete the value at path, if it exists.
Sourcefn batch_update<K, V, I>(&self, iter: I) -> Result<()>
fn batch_update<K, V, I>(&self, iter: I) -> Result<()>
Execute in an atomic combination of put and delete operations.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".