Docs Menu

Docs HomeDevelop ApplicationsMongoDB DriversRust Driver

What's New

On this page

  • What's New in 2.8
  • What's New in 2.7
  • What's New in 2.6

Learn about new features, improvements, and fixes introduced in the following versions of the MongoDB Rust Driver:

  • Version 2.8

  • Version 2.7

  • Version 2.6

The Rust driver v2.8 release includes the following features, improvements, and fixes:

  • Adds MongoDB Atlas Search index management methods. To learn more about these methods, see the Atlas Search Indexes guide.

  • Improves network connectivity and operation reliability by implementing the following behaviors:

    • Performs retries on a greater range of error types that the driver encounters.

    • Avoids retries for mongos instances experiencing network connectivity issues.

To learn more about this release, see the v2.8.0 Release Highlights on GitHub.

The Rust driver v2.7 release includes the following features, improvements, and fixes:

  • Adds the human_readable_serialization option to the CollectionOptions struct. This option instructs the driver to serialize values passed to CRUD methods as a human-readable format. The default value of this option is false.

    Warning

    If you set the value of human_readable_serialization to true, your insert operations might run more slowly.

  • Adds the run_cursor_command() method to run a database command and retrieve the response as a Cursor type. To learn more, see the Run a Command guide.

  • Adds SDAM event logging when you use the tracing-unstable feature flag.

  • Adds the following configurations for Client and connection management:

    • max_connecting: an option that you can set in a ClientOptions struct to specify how many connections you can establish in parallel. To learn more about this option, see Connection Pool in the Performance Considerations guide.

    • Client::warm_connection_pool(): a method that you can use to create new connections in the connection pool to provide more predictable performance. When you use this method, the driver attempts to create connections up to the number specified in the min_pool_size setting.

    • Client::shutdown(): a method that you can use to stop background tasks and wait for handlers to drop. This method can be helpful if you use event handlers to reference external resources, as these handlers might be used in tasks even after the Client is closed.

To learn more about this release, see the v2.7.0 Release Highlights on GitHub.

The Rust driver v2.6 release includes the following features, improvements, and fixes:

  • Supports AWS Identity and Access Management (IAM) roles for service accounts, such as Elastic Kubernetes Service (EKS) accounts.

  • Supports GCP-attached service accounts when using the Cloud Key Management System (KMS).

  • Supports fetching on-demand CSFLE credentials from the Azure KMS.

  • Implements the FromStr trait for the Namespace struct. This change allows you to parse a string that includes a database and collection name, such as "testdb.testcollection" into a Namespace instance.

  • Includes the server_id in a ConnectionInfo struct as an i64 type.

  • Removes most type constraints on values referenced by a Cursor.

  • Updates the libmongocrypt version in the driver dependencies in order to use the Queryable Encryption feature with equality queries.

To learn more about this release, see the v2.6.0 Release Highlights on GitHub.

←  Quick ReferenceUsage Examples →