Thanks to visit codestin.com
Credit goes to lib.rs

Cargo Features

[dependencies]
mongodb = { version = "3.3.0", default-features = false, features = ["compat-3-0-0", "compat-3-3-0", "bson-2", "bson-3", "sync", "rustls-tls", "openssl-tls", "dns-resolver", "cert-key-password", "aws-auth", "azure-kms", "azure-oidc", "gcp-oidc", "gcp-kms", "gssapi-auth", "zstd-compression", "zlib-compression", "snappy-compression", "in-use-encryption", "in-use-encryption-unstable", "tracing-unstable"] }
default = compat-3-0-0, dns-resolver, rustls-tls

These default features are set whenever mongodb is added without default-features = false somewhere in the dependency tree.

compat-3-0-0 default = bson-2, compat-3-3-0
compat-3-3-0 compat-3-0-0
bson-2 compat-3-0-0

Enables bson ^2.15.0, bson-2 of mongocrypt

bson-3

Enables bson, bson-3 of mongocrypt

sync

Affects mongodb::sync

rustls-tls default

Enables rustls and tokio-rustls

openssl-tls

Enables openssl, openssl-probe, and tokio-openssl

Affects options::TlsOptions.allow_invalid_hostnames

dns-resolver default gssapi-auth?

Enables hickory-proto ^0.24.2 and hickory-resolver ^0.24.2

cert-key-password

Enables pem and pkcs8

Affects options::TlsOptions.tls_certificate_key_file_password

aws-auth

Enable support for MONGODB-AWS authentication.

Enables aws-config, aws-credential-types, aws-sigv4, aws-types, and http

azure-kms

Enable support for on-demand Azure KMS credentials.

Enables reqwest

azure-oidc

Enable support for azure OIDC authentication.

Enables reqwest

gcp-oidc

Enable support for gcp OIDC authentication.

Enables reqwest

gcp-kms

Enable support for on-demand GCP KMS credentials.

Enables reqwest

gssapi-auth = dns-resolver

Enable support for GSSAPI (Kerberos) authentication.

Enables cross-krb5 and windows-sys ^0.60

zstd-compression

Enables zstd ^0.11.2

Affects options::ClientOptions.compressors, options::ConnectionString.compressors

zlib-compression

Enables flate2

Affects options::ClientOptions.compressors, options::ConnectionString.compressors

snappy-compression

Enables snap

Affects options::ClientOptions.compressors, options::ConnectionString.compressors

in-use-encryption in-use-encryption-unstable?

Enables support for client-side field level encryption and queryable encryption.

Enables mongocrypt, num_cpus, and rayon

Affects action::csfle, options::DropCollectionOptions.encrypted_fields, options::CreateCollectionOptions.encrypted_fields

in-use-encryption-unstable = in-use-encryption

The in-use encryption API is stable; this is for backwards compatibility.

tracing-unstable

Enables support for emitting tracing events. The tracing API is unstable and may have backwards-incompatible changes in minor version updates. TODO: pending https://github.com/tokio-rs/tracing/issues/2036 stop depending directly on log.

Enables log and tracing, serde_json-1 of optional bson

Affects options::ClientOptions.tracing_max_document_length_bytes