mod error;
mod key;
mod test_utils;
mod value;
#[cfg(not(target_arch = "wasm32"))]
mod store;
use rustolio_utils::prelude::*;
pub mod client;
pub use error::{Error, Result};
pub use key::{Key, KeyType};
pub use value::Value;
const DATA_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/data");
#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, service::Service)]
pub struct Service {
store_service: store::Service,
}
#[cfg(not(target_arch = "wasm32"))]
impl Default for Service {
fn default() -> Self {
Self::new()
}
}
impl Service {
pub fn new() -> Self {
Service {
store_service: store::Service::new(1_000, DATA_DIR.into()),
}
}
}