use mongors::*; use bsonrs::doc; fn main() { let mut apm = apm::Apm::new(); apm.set_command_started(|params| { println!("command started: {:?}", params); }); apm.set_command_succeeded(|params| { println!("command succeeded: {:?}", params); }); apm.set_command_failed(|params| { println!("command failed: {:?}", params); }); let mongo = client::MongoBuilder::new() .url("mongodb://localhost:27017/") .apm(apm) .builder() .unwrap(); let cmd = doc!{ "serverStatus": 1 }; let reply = mongo.command_simple("admin", cmd, None); //println!("{:?}", reply); }