/// Runs an aggregation operation.
///
/// See the documentation [here](https://docs.mongodb.com/manual/aggregation/) for more
/// information on aggregations.
Runs an aggregation operation.
See the documentation [here] for more
information on aggregations.
Runs an aggregation operation . See the documentation [ here ] for more information on aggregations .
pub fn aggregate(
        &self,
        pipeline: impl IntoIterator<Item = Document>,
        options: impl Into<Option<AggregateOptions>>,
    ) -> Result<Cursor<Document>> {
        let pipeline: Vec<Document> = pipeline.into_iter().collect();
        RUNTIME
            .block_on(self.async_database.aggregate(pipeline, options.into()))
            .map(Cursor::new)
    }
pub fn aggregate ( & self , pipeline : impl IntoIterator < Item = Document > , options : impl Into < Option < AggregateOptions > > , ) -> Result < Cursor < Document > > { let pipeline : Vec < Document > = pipeline . into_iter ( ) . collect ( ) ; RUNTIME . block_on ( self . async_database . aggregate ( pipeline , options . into ( ) ) ) . map ( Cursor :: new ) }
Runs an aggregation operation.
Runs an aggregation operation .
&self
pipeline
impl IntoIterator<Item = Document>
options
impl Into<Option<AggregateOptions>>