vedvaring
A wrapper that automatically saves your object to disk whenever it's modified, ensuring no inconsistency between the in-memory representation and what’s saved on disk.
You only need to implement one method: item_id.
Usage
1. Implement the trait
use ;
use ;
2. Create and save
let user = new;
3. Read and write
let user_id = 1;
let user = load.unwrap;
println!;
*user.write.name = Stringfrom; // Automatically saved after this line.
Storage
Data is by default stored to:
~/.local/share/<crate-name>/<type-name>/<id>
For example, if your crate is named my_crate and you're saving a MyUser,
the file will be:
~/.local/share/my_crate/myuser/<id>