Crate nihdb [−] [src]
NihDB
use nihdb::Store; let dir = "./testdir-nihdb/"; Store::create(dir).unwrap(); { let mut store: Store = Store::open(dir, 2000000).unwrap(); store.put("some_key".as_bytes(), "Some Value".as_bytes()).unwrap(); match store.get("some_key".as_bytes()).unwrap() { None => { println!("Not found!"); }, Some(v) => { println!("The value is {}", String::from_utf8(v).unwrap()); }, }; } std::fs::remove_dir_all(dir).unwrap();
Structs
Store | |
StoreIter |