use async_trait::async_trait;
use serde::de::DeserializeOwned;
use std::error::Error;
#[async_trait]
pub trait StorageBackend: Send + Sized + Sync + 'static {
type ConfigBuilder: Default + DeserializeOwned + Into<Self::Config>;
type Config: Clone + Send + Sync;
type Error: std::error::Error + Send;
async fn start(config: Self::Config) -> Result<Self, Box<dyn Error>>;
async fn shutdown(self) -> Result<(), Box<dyn Error>>;
}