noosphere_storage/
config.rs1use crate::storage::Storage;
2use anyhow::Result;
3use async_trait::async_trait;
4use noosphere_common::ConditionalSend;
5use std::path::Path;
6
7#[derive(Debug, Clone, Default)]
9pub struct StorageConfig {
10 pub memory_cache_limit: Option<usize>,
12}
13
14#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
19#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
20pub trait ConfigurableStorage: Storage {
21 async fn open_with_config<P: AsRef<Path> + ConditionalSend>(
22 path: P,
23 config: StorageConfig,
24 ) -> Result<Self>;
25}