pub trait BaseStore: Send + Sync {
// Required methods
fn get(
&self,
namespace: &str,
key: &str,
) -> Result<Option<Vec<u8>>, VfsError>;
fn set(
&self,
namespace: &str,
key: &str,
value: Vec<u8>,
) -> Result<(), VfsError>;
fn delete(&self, namespace: &str, key: &str) -> Result<(), VfsError>;
fn list(&self, namespace: &str) -> Result<Vec<String>, VfsError>;
}Expand description
Namespaced key-value store that delegates to a BaseStore.
In production this wraps a SQLite checkpoint. In tests it wraps an
in-memory map. All keys are namespaced by namespace/key.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".