Anor In-Memory Data Storage
Anor storage is an open-source, in-memory key-value data store written in Rust.
The storage currently supports point-in-time, snapshot-based persistence in local disk.
Project Stage
Development: this project already has milestone releases, but is still under active development, you should not expect full stability yet.
Usage
Please look at samples
Usage samples
Sample of storing a string: sample_string.rs
use ;
let key = "my_string";
let sample_string = Stringfrom;
// storage would be dropped after leaving the scope
// open the storage
let storage_loaded = open;
// get the string from the storage by key
let loaded_value = storage_loaded..unwrap;
assert_eq!;
Sample of storing a map: sample_map.rs
use ;
use HashMap;
let key = "my_map";
let mut sample_map = new;
sample_map.insert;
sample_map.insert;
sample_map.insert;
// storage would be dropped after leaving the scope
// open the storage
let storage_loaded = open;
// get the map from the storage by key
let map_loaded: = storage_loaded.get_inner_object.unwrap;
assert_eq!;