Skip to content

struct

Builder

pub struct Builder {
    pub cmd: Command,
    /* private fields */
}

A MongoDB command being built, sent with [Builder::request].

Fields

cmd

pub cmd: Command

The command so far.

Methods

filter

pub fn filter(self, f: Json) -> Builder

Which documents it applies to.

sort

pub fn sort(self, s: Json) -> Builder

How results are ordered ({ "date": -1 }).

projection

pub fn projection(self, p: Json) -> Builder

Which fields results include.

limit

pub fn limit(self, n: i64) -> Builder

At most n results.

skip

pub fn skip(self, n: u64) -> Builder

Skip the first n results.

request

pub fn request(&self) -> Request

The request to send to the route.

Trait implementations