#[cfg(feature = "wasm")]
pub mod idb;
pub mod memory;
#[cfg(all(not(feature = "wasm"), not(feature = "dummy")))]
pub mod sled;
use async_trait::async_trait;
use crate::error::Result;
pub use crate::storage::memory::MemStorage;
#[cfg_attr(feature = "wasm", async_trait(?Send))]
#[cfg_attr(not(feature = "wasm"), async_trait)]
pub trait KvStorageInterface<V> {
async fn get(&self, key: &str) -> Result<Option<V>>;
async fn put(&self, key: &str, value: &V) -> Result<()>;
async fn get_all(&self) -> Result<Vec<(String, V)>>;
async fn remove(&self, key: &str) -> Result<()>;
async fn clear(&self) -> Result<()>;
async fn count(&self) -> Result<u32>;
}