Crates.io | fsdb |
lib.rs | fsdb |
version | 0.1.18 |
source | src |
created_at | 2022-07-17 18:58:42.770512 |
updated_at | 2023-09-15 17:25:29.65269 |
description | filesystem database |
homepage | |
repository | https://github.com/Evanfeenstra/fsdb |
max_upload_size | |
id | 627327 |
size | 18,236 |
Filesystem database
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
struct Thing {
n: u8,
}
fn main() -> Result<()> {
let db = Fsdb::new("testdb")?;
let b = db.bucket("testbucket")?;
let t1 = Thing { n: 1 };
b.put("testkey", t1.clone())?
let t2: Thing = b.get("testkey")?
assert_eq!(t1, t2);
Ok(())
}