use crate::Result;
#[async_trait::async_trait]
pub trait ConfigManager {
async fn get<T: serde::de::DeserializeOwned>(&self, key: &str) -> Result<T>;
async fn set<T: serde::Serialize + Send>(&self, key: &str, value: T) -> Result<()>;
async fn delete(&self, key: &str) -> Result<bool>;
async fn exists(&self, key: &str) -> Result<bool>;
async fn list_keys(&self) -> Result<Vec<String>>;
async fn load_from_file(&self, path: &std::path::Path) -> Result<()>;
async fn save_to_file(&self, path: &std::path::Path) -> Result<()>;
async fn reload(&self) -> Result<()>;
}