#[cfg(feature = "filesystem-storage")]
#[cfg_attr(docsrs, doc(cfg(feature = "filesystem-storage")))]
pub mod filesystem;
#[cfg(feature = "in-memory-storage")]
#[cfg_attr(docsrs, doc(cfg(feature = "in-memory-storage")))]
pub mod memory;
pub use async_trait::async_trait;
#[async_trait]
pub trait Storage: Send + Sync + 'static {
async fn set(&self, key: String, value: String) -> super::Result<()>;
async fn get(&self, key: String) -> super::Result<String>;
async fn delete(&self, key: String) -> super::Result<()>;
async fn exists(&self, key: String) -> super::Result<bool>;
async fn increment(&self, key: String, num: usize) -> super::Result<usize>;
async fn decrement(&self, key: String, num: usize) -> super::Result<usize>;
async fn search(&self, key: String) -> super::Result<Vec<String>>;
async fn flush(&self) -> super::Result<()>;
}