pub trait KeyValueStore: Send + Sync {
// Required methods
fn get_all(&self) -> HashMap<String, Value>;
fn get(&self, key: &str) -> Option<Value>;
fn set(&self, key: &str, value: Value);
fn mset(&self, kv_pairs: &[(String, Value)]);
fn exists(&self, key: &str) -> bool;
fn keys(&self) -> Vec<String>;
fn mget(&self, keys: &[String]) -> HashMap<String, Value>;
fn delete(&self, key: &str);
fn get_prefix(&self, prefix: &str) -> HashMap<String, Value>;
}Expand description
Abstract interface for key-value storage backends