pub trait KeyValue: Send + Sync {
    // Required methods
    fn get(&self, key: Vec<u8>) -> Result<Vec<u8>, Error>;
    fn insert(&self, key: Vec<u8>, value: Vec<u8>) -> Result<(), Error>;
}
Expand description

Trivial Key/Value storage.

Required Methods§

source

fn get(&self, key: Vec<u8>) -> Result<Vec<u8>, Error>

Fetch the value for a specific key.

source

fn insert(&self, key: Vec<u8>, value: Vec<u8>) -> Result<(), Error>

Store a specific key/value into storage.

Implementations on Foreign Types§

source§

impl<T: ?Sized + KeyValue> KeyValue for Arc<T>

source§

fn get(&self, key: Vec<u8>) -> Result<Vec<u8>, Error>

source§

fn insert(&self, key: Vec<u8>, value: Vec<u8>) -> Result<(), Error>

Implementors§