1mod error;
12mod key;
14mod test_utils;
15mod value;
16
17#[cfg(not(target_arch = "wasm32"))]
18mod store;
19
20use rustolio_utils::prelude::*;
21
22pub mod client;
23
24pub use error::{Error, Result};
25pub use key::{Key, KeyType};
26pub use value::Value;
27
28const DATA_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/data");
29
30#[cfg(not(target_arch = "wasm32"))]
31#[derive(Debug, service::Service)]
32pub struct Service {
33 store_service: store::Service,
34}
35
36#[cfg(not(target_arch = "wasm32"))]
37impl Default for Service {
38 fn default() -> Self {
39 Self::new()
40 }
41}
42
43impl Service {
44 pub fn new() -> Self {
45 Service {
46 store_service: store::Service::new(1_000, DATA_DIR.into()),
47 }
48 }
49}