Not Mongo
notmongo is a simple embedded database, for when you really want MongoDB, but
running a separate database isn't practical.
All data is kept in-memory. Persistence is achieved by explicitly reading/writing data from/to disk.
// Program start: Read the data from a file
let mut db = new_from_json_file?;
// Get the collection to search in
let collection = db.collection_mut;
// Build the query
let find_query = parse_bson?;
// Run it
println!;
// Store the database back to disk
db.dump_to_json_file?;
Notes
notmongo is really meant as a Python library. The logic is implemented in Rust
in order to achieve adequate performance, but Rust is not this library's primary
target.
With that said, I see no reason why it shouldn't be usable directly from Rust, hence this package.