[][src]Trait avocado::ops::Pipeline

pub trait Pipeline<T: Doc>: Debug {
    type Output: for<'a> Deserialize<'a>;
    fn stages(&self) -> Vec<Document>;

    fn transform(raw: Document) -> Result<Bson> { ... }
fn options() -> AggregateOptions { ... } }

An aggregation pipeline.

Associated Types

type Output: for<'a> Deserialize<'a>

The type of the values obtained by running this pipeline.

Loading content...

Required methods

fn stages(&self) -> Vec<Document>

The stages of the aggregation pipeline.

Loading content...

Provided methods

fn transform(raw: Document) -> Result<Bson>

Optional transform applied to each returned raw document. Can be used to adjust the structure of the loosely-typed data so that it fits what is expected by <Self::Output as Deserialize>::deserialize().

The default implementation just returns its argument verbatim.

fn options() -> AggregateOptions

Options for this pipeline.

Loading content...

Implementations on Foreign Types

impl<T: Doc, P: Pipeline<T>, '_> Pipeline<T> for &'_ P
[src]

Loading content...

Implementors

Loading content...