use std::fmt;
use std::future::Future;
use super::StorageError;
pub trait Storage: fmt::Debug + Send + Sync {
fn put(&self, key: &str, bytes: &[u8]) -> impl Future<Output = Result<(), StorageError>>;
fn put_overwrite(
&self,
key: &str,
bytes: &[u8],
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn get(&self, key: &str) -> impl Future<Output = Result<Vec<u8>, StorageError>> + Send;
fn list(&self, prefix: &str) -> impl Future<Output = Result<Vec<String>, StorageError>>;
fn delete(&self, key: &str) -> impl Future<Output = Result<(), StorageError>>;
}