use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
#[non_exhaustive]
pub enum StorageKind {
#[cfg(feature = "rocksdb")]
Rocksdb,
Memory,
#[cfg(target_family = "wasm")]
Wasm,
}
impl Default for StorageKind {
fn default() -> Self {
#[cfg(feature = "rocksdb")]
return Self::Rocksdb;
#[cfg(target_family = "wasm")]
return Self::Wasm;
#[cfg(not(any(feature = "rocksdb", target_family = "wasm")))]
Self::Memory
}
}