toiletdb 🚽🦀
Flushes an object to a JSON file. Rust implementation of https://github.com/maxogden/toiletdb
A Rust key/value store backed by a JSON file.
Usage
use Toiletdb;
// pass the name of the json file to use
API
db.write(key, value)
sets key
to val
inside the JSON file
db.read()
read the entire JSON file to a String
db.read_key(key)
get the value of a key
db.delete(key)
deletes key
and it's value from the JSON file
db.flush()
resets state and deletes the JSON file
Installation
With cargo-edit:
cargo add toiletdb
Or manually add toiletdb to Cargo.toml
toiletdb = "0.1.0"
See Also
License
MIT