pub trait MongoCollection {
const COLLECTION: &'static str;
// Provided method
fn mongo_collection<T>(db: &Database) -> Collection<T>
where T: Send + Sync { ... }
}Expand description
Trait for MongoDB collection access.
Required Associated Constants§
Sourceconst COLLECTION: &'static str
const COLLECTION: &'static str
Collection name.
Provided Methods§
Sourcefn mongo_collection<T>(db: &Database) -> Collection<T>
fn mongo_collection<T>(db: &Database) -> Collection<T>
Gets the MongoDB collection.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.