pub mod memory;
#[cfg(feature = "rocksdb")]
#[cfg_attr(docsrs, doc(cfg(feature = "rocksdb")))]
pub mod rocksdb;
use std::collections::HashMap;
#[async_trait::async_trait]
pub trait StorageAdapter: std::fmt::Debug {
fn id(&self) -> &'static str {
"custom-adapter"
}
async fn get(&self, key: &str) -> crate::wallet::Result<Option<String>>;
async fn set(&mut self, key: &str, record: String) -> crate::wallet::Result<()>;
async fn batch_set(&mut self, records: HashMap<String, String>) -> crate::wallet::Result<()>;
async fn remove(&mut self, key: &str) -> crate::wallet::Result<()>;
}