#[cfg(all(feature = "wasm", target_family = "wasm"))]
pub mod idb;
pub mod memory;
#[cfg(not(all(feature = "wasm", target_family = "wasm")))]
pub mod sled;
use async_trait::async_trait;
use crate::error::Result;
pub use crate::storage::memory::MemStorage;
#[cfg_attr(all(feature = "wasm", target_family = "wasm"), async_trait(?Send))]
#[cfg_attr(not(all(feature = "wasm", target_family = "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>;
}