inspired by the mongoose
npm package, this crate contains the Mungos
struct, a wrapper around the mongodb client containing some additional queries and functionality
```rust
struct TestDoc { timestamp: i64, name: String, #[serde(default)] description: String, }
let mungos = mungos::Mungos::new(uri, appname, Duration::fromsecs(3), None).await.unwrap();
let coll = mungos.collection::
let items: Vec
println!("{items:#?}"); // prints the 10 most recent docs by timestamp ```
```
MONGO_URI=mongodb://username:password@localhost:27017
MONGOADDRESS=localhost:27017 MONGOUSERNAME=username MONGO_PASSWORD=password
MONGOAPPNAME=tester # optional. default is 'mungos' MONGOTIMEOUTSECS=30 # optional. default is '3' MONGO_COMPRESSORS=snappy,zstd(10),zlib(8) # optional. defaults to None ```
```rust
let mungos = mungos::Mungos::newfromenv().await.unwrap();
let coll = mungos.collection::
let items = coll.get_some(None, None).await.unwrap(); // Vec