Module mongodb::options

source ·
Expand description

Contains all of the types needed to specify options to MongoDB operations.

Most of the options structs in this module use the typed-builder crate to derive a type-safe builder API on them. For example, to create an instance of FindOptions with only limit and batch_size set, the builder API can be used as follows:

use mongodb::options::FindOptions;

let options = FindOptions::builder()
                  .limit(20)
                  .batch_size(5)
                  .build();

Structs§

Enums§

Type Aliases§

  • A predicate used to filter servers that are considered suitable.
  • A read preference tag set. See the documentation here for more details.