Module qm_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§
- Specifies the options to a
Collection::aggregateoperation. - These are the valid options that can be passed to the
watchmethod for creating aChangeStream. - Specifies how change stream pre- and post-images should be supported.
- Contains the options that can be used to create a new
Client. - Specifies options for a clustered collection. Some fields have required values; the
Defaultimpl uses those values. - A collation configuration. See the official MongoDB documentation for more information on each of the fields.
- These are the valid options for creating a
CollectionwithDatabase::collection_with_options. - Contains the options that can be set via a MongoDB connection string.
- Specifies the options to a
Collection::count_documentsoperation. - These are the valid options for creating a collection with
Database::create_collection. - Specifies the options to a
Collection::create_indexorCollection:: create_indexesoperation. - Options for [Collection::create_search_index]. Present to allow additional options to be added in the future as a non-breaking change.
- A struct containing authentication information.
- These are the valid options for creating a
DatabasewithClient::database_with_options. - Specifies the options to a
Collection::delete_oneorCollection::delete_manyoperation. - Specifies the options to a
Collection::distinctoperation. - 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::dropoperation. - Specifies the options to a
Database::dropoperation. - Specifies the options to a
Collection::drop_indexorCollection::drop_indexesoperation. - Options for [Collection::drop_search_index]. Present to allow additional options to be added in the future as a non-breaking change.
- Specifies the options to a
Collection::estimated_document_countoperation. - Specifies the options to a
Collection::find_one_and_deleteoperation. - Specifies the options to a
Collection::find_one_and_replaceoperation. - Specifies the options to a
Collection::find_one_and_updateoperation. - Specifies the options to a
Collection::find_oneoperation. - Specifies the options to a
Collection::findoperation. - Contains the options for creating a
GridFsBucket. - Contains the options for downloading a file from a
GridFsBucketby name. - Contains the options for finding
FilesCollectionDocuments in aGridFsBucket. - Contains the options for uploading a file to a
GridFsBucket. - Specifies hedging behavior for reads.
- Specifies default configuration for indexes created on a collection, including the _id index.
- These are the valid options for specifying an
IndexModel. For more information on these properties, see the documentation. - Specifies the options to a
Collection::insert_manyoperation. - Specifies the options to a
Collection::insert_oneoperation. - Specifies the options to a
Database::list_collectionsoperation. - Specifies the options to a
Client::list_databasesoperation. - Specifies the options to a
Collection::list_indexesoperation. - Options for [Collection::list_search_indexes]. Present to allow additional options to be added in the future as a non-breaking change.
- 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_oneoperation. - Configuration for the upstream nameservers to use for resolution.
- Specifies the options to a
Database::RunCursorCommandoperation. - Options used to declare a stable server API. For more information, see the Stable API manual page.
- Contains the options that can be used to create a new
ClientSession. - Specifies options for creating a timeseries collection.
- Specifies the TLS configuration that the
Clientshould use. - Contains the options that can be used for a transaction.
- Specifies the options to a
Collection::update_oneorCollection::update_manyoperation. - Options for [Collection::update_search_index]. Present to allow additional options to be added in the future as a non-breaking change.
- Specifies the level of acknowledgement requested from the server for write operations.
Enums§
- The type of the
wfield in aWriteConcern. - 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.
- The minimum number of data-bearing voting replica set members (i.e. commit quorum), including the primary, that must report a successful index build before the primary marks the indexes as ready.
- Enum representing supported compressor algorithms. Used for compressing and decompressing messages sent to and read from the server. For compressors that take a
level, useNoneto indicate the default level. Higherlevelindicates more compression (and slower). Requireszstd-compressionfeature flag to useZstdcompressor,zlib-compressionfeature flag to useZlibcompressor, andsnappy-compressionfeature flag to useSnappyCompressor. - Specifies the type of cursor to return from a find operation.
- Describes the modes for configuring the
ChangeStreamEvent::full_document_before_changefield. - Describes the modes for configuring the
ChangeStreamEvent::full_documentfield. - Specifies the index to use for an operation.
- Specification for mongodb server connections.
- The version of the index. Version 0 Indexes are disallowed as of MongoDB 3.2.
- 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_replaceandCollection::find_one_and_updateoperation 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 the server API version to declare
- Specify the version for a
2dsphereindex. For more information, see Versions. - Specify the version for a
textindex. For more information, see Versions. - The units you’d use to describe the expected interval between subsequent measurements for a time-series.
- Specifies whether TLS configuration should be used with the operations that the
Clientperforms. - 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 Aliases§
- A predicate used to filter servers that are considered suitable.
- A read preference tag set. See the documentation here for more details.