use crate::block::BlockStore;
use crate::key_value::KeyValueStore;
use anyhow::Result;
use async_trait::async_trait;
use noosphere_common::ConditionalSync;
use std::fmt::Debug;
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
pub trait Storage: Clone + ConditionalSync + Debug {
type BlockStore: BlockStore;
type KeyValueStore: KeyValueStore;
async fn get_block_store(&self, name: &str) -> Result<Self::BlockStore>;
async fn get_key_value_store(&self, name: &str) -> Result<Self::KeyValueStore>;
}