[][src]Module mongodb::options

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

AggregateOptions

Specifies the options to a Collection::aggregate operation.

ClientOptions

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

Collation

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

CollectionOptions

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

CountOptions

Specifies the options to a Collection::count_documents operation.

CreateCollectionOptions

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

Credential

A struct containing authentication information.

DatabaseOptions

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

DeleteOptions

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

DistinctOptions

Specifies the options to a Collection::distinct operation.

DriverInfo

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.

DropCollectionOptions

Specifies the options to a Collection::drop operation.

DropDatabaseOptions

Specifies the options to a Database::drop operation.

EstimatedDocumentCountOptions

Specifies the options to a Collection::estimated_document_count operation.

FindOneAndDeleteOptions

Specifies the options to a Collection::find_one_and_delete operation.

FindOneAndReplaceOptions

Specifies the options to a Collection::find_one_and_replace operation.

FindOneAndUpdateOptions

Specifies the options to a Collection::find_one_and_update operation.

FindOneOptions

Specifies the options to a Collection::find_one operation.

FindOptions

Specifies the options to a Collection::find operation.

HedgedReadOptions

Specifies hedging behavior for reads.

IndexOptionDefaults

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

InsertManyOptions

Specifies the options to a Collection::insert_many operation.

InsertOneOptions

Specifies the options to a Collection::insert_one operation.

ListCollectionsOptions

Specifies the options to a Database::list_collections operation.

ListDatabasesOptions

Specifies the options to a Client::list_databases operation.

ReadConcern

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

ReadPreferenceOptions

Specifies read preference options for non-primary read preferences.

ReplaceOptions

Specifies the options to a Collection::replace_one operation.

ResolverConfig

Configuration for the upstream nameservers to use for resolution

StreamAddress

A hostname:port address pair.

TlsOptions

Specifies the TLS configuration that the Client should use.

UpdateOptions

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

WriteConcern

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

Enums

Acknowledgment

The type of the w field in a WriteConcern.

AuthMechanism

The authentication mechanisms supported by MongoDB.

CursorType

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

Hint

Specifies the index to use for an operation.

ReadConcernLevel

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

ReadPreference

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

ReturnDocument

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

SelectionCriteria

Describes which servers are suitable for a given operation.

Tls

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

UpdateModifications

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

ValidationAction

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

ValidationLevel

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

Type Definitions

Predicate

A predicate used to filter servers that are considered suitable.

TagSet

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