Module mongodb::options[][src]

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:

Structs

Specifies the options to a Collection::aggregate operation.

Contains the options that can be used to create a new Client.

A collation configuration. See the official MongoDB documentation for more information on each of the fields.

These are the valid options for creating a Collection with Database::collection_with_options.

Specifies the options to a Collection::count_documents operation.

These are the valid options for creating a collection with Database::create_collection.

A struct containing authentication information.

These are the valid options for creating a Database with Client::database_with_options.

Specifies the options to a Collection::delete_one or Collection::delete_many operation.

Specifies the options to a Collection::distinct operation.

Extra information to append to the driver version in the metadata of the handshake with the server. This should be used by libraries wrapping the driver, e.g. ODMs.

Specifies the options to a Collection::drop operation.

Specifies the options to a Database::drop operation.

Specifies the options to a Collection::estimated_document_count operation.

Specifies the options to a Collection::find_one_and_delete operation.

Specifies the options to a Collection::find_one_and_replace operation.

Specifies the options to a Collection::find_one_and_update operation.

Specifies the options to a Collection::find_one operation.

Specifies the options to a Collection::find operation.

Specifies hedging behavior for reads.

Specifies default configuration for indexes created on a collection, including the _id index.

Specifies the options to a Collection::insert_many operation.

Specifies the options to a Collection::insert_one operation.

Specifies the options to a Database::list_collections operation.

Specifies the options to a Client::list_databases operation.

Specifies the consistency and isolation properties of read operations from replica sets and replica set shards.

Specifies read preference options for non-primary read preferences.

Specifies the options to a Collection::replace_one operation.

Configuration for the upstream nameservers to use for resolution.

Contains the options that can be used to create a new ClientSession.

Deprecated

A hostname:port address pair.

Specifies the TLS configuration that the Client should use.

Contains the options that can be used for a transaction.

Specifies the options to a Collection::update_one or Collection::update_many operation.

Specifies the level of acknowledgement requested from the server for write operations.

Enums

The type of the w field in a WriteConcern.

The authentication mechanisms supported by MongoDB.

Setting that determines whether collation should consider whitespace and punctuation as base characters for purposes of comparison.

Setting that determines sort order of case differences during case tertiary level comparisons. For more info, see http://userguide.icu-project.org/collation/customization.

Field that determines up to which characters are considered ignorable when alternate: “shifted”.

The level of comparison to perform. Corresponds to ICU Comparison Levels.

Specifies the type of cursor to return from a find operation.

Specifies the index to use for an operation.

Specifies the level consistency and isolation properties of a given ReadCocnern.

Specifies how the driver should route a read operation to members of a replica set.

Specifies whether a Collection::find_one_and_replace and Collection::find_one_and_update operation should return the document before or after modification.

Describes which servers are suitable for a given operation.

An enum representing the address of a MongoDB server.

Specifies whether TLS configuration should be used with the operations that the Client performs.

Enum modeling the modifications to apply during an update. For details, see the official MongoDB documentation

Specifies whether the database should return an error or simply raise a warning if inserted documents do not pass the validation.

Specifies how strictly the database should apply validation rules to existing documents during an update.

Type Definitions

A predicate used to filter servers that are considered suitable.

A read preference tag set. See the documentation here for more details.