Skip to main content

MongoCollection

Trait MongoCollection 

Source
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§

Source

const COLLECTION: &'static str

Collection name.

Provided Methods§

Source

fn mongo_collection<T>(db: &Database) -> Collection<T>
where T: Send + Sync,

Gets the MongoDB collection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§