feat(kvs): improve KVS trait signature

This commit is contained in:
Federico Terzi 2021-06-26 19:48:54 +02:00
parent 8f99c6ce16
commit c5ef5337bf

View File

@ -24,7 +24,7 @@ use serde::{de::DeserializeOwned, Serialize};
mod persistent;
pub trait KVS: Send + Sync {
pub trait KVS: Send + Sync + Clone {
fn get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>>;
fn set<T: Serialize>(&self, key: &str, value: T) -> Result<()>;
fn delete(&self, key: &str) -> Result<()>;