/// Finds the documents in the collection matching filter.
Finds the documents in the collection matching filter.
Finds the documents in the collection matching filter .
async fn find<F, O>(db: Database, filter: F, options: O) -> Result<Option<Self>>
    where
        F: Into<Option<Document>> + Send,
        O: Into<Option<options::FindOneOptions>> + Send,
    {
        Ok(Self::collection(db)
            .find_one(filter, options)
            .await?
            .map(Self::from_bson)
            .transpose()?)
    }
async fn find < F , O > ( db : Database , filter : F , options : O ) -> Result < Option < Self > > where F : Into < Option < Document > > + Send , O : Into < Option < options :: FindOneOptions > > + Send , { Ok ( Self :: collection ( db ) . find_one ( filter , options ) . await ? . map ( Self :: from_bson ) . transpose ( ) ? ) }
Finds the documents in the collection matching filter.
Finds the documents in the collection matching filter .
db
Database
filter
F
options
O