📜  在 MongoDB 部署中获取数据库的句柄 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:12.654000             🧑  作者: Mango

代码示例1
// Get a handle to a database.
let db = client.database("mydb");

// List the names of the collections in that database.
for collection_name in db.list_collection_names(None).await? {
    println!("{}", collection_name);
}