Description
The MongoDB Rust driver team is pleased to announce the first release candidate of the driver, v0.11.0.
Major Features
In preparation of stabilizing the API of the driver, we made a number of breaking changes. The
individual changes are listed below in the release notes, each with a short description of why we
made the change.
Release Notes
Breaking Changes
- RUST-261 Mark enums and options struct as non-exhaustible
- In order to ensure that adding new variants to our enums (e.g.
mongodb::error::ErrorKind
) in
the future will not cause breaking changes for users who are pattern matching them, we've
marked some of them as non-exhaustive. Additionally, in order to be able to add new options to
our options structs in the future, we've also marked them as non-exhaustive. This has the
side-effect of making them impossible to instantiate with struct literals. The workaround is to
use the auto-generated builder pattern API for them, which continues to be available as before.
- In order to ensure that adding new variants to our enums (e.g.
- RUST-434 Rewrite ReadConcern as a struct
- In order to allow us to add any potential new read concern options that might be added in the
future, we've changedmongodb::options::ReadConcern
to be a (non-exhaustive) struct rather
than an enum. To ensure that it's easy to use, we've added a helper method for each ReadConcern
level to faciliatate construction.
- In order to allow us to add any potential new read concern options that might be added in the
- RUST-433 Rename "Tag" Acknowledgement case to "Custom"
- The original name for this enum variant was a bit misleading. The official documentation for
write
concerns
has since been updated to describe this type of write concern as "custom" rather than "tag", so
we changed the API of the driver accordingly.
- The original name for this enum variant was a bit misleading. The official documentation for
- RUST-435 Standardize on options exporting strategy
- We previously exported the authentication options exposed by the driver under the namespace
mongodb::options::auth
, whereas the rest of the driver's options were exported directly from
mongodb::options
. We now export the auth options directly frommongodb::options
for
consistency.
- We previously exported the authentication options exposed by the driver under the namespace
Bug fixes
- RUST-408 Sync API not included in the generated documentation
New Features
- RUST-289 Implicit Sessions
- RUST-392 Suppress "ns not found" errors
- RUST-396 run_command should parse server errors
- RUST-409 Add DriverInfoOptions to client metadata
Improvements
- RUST-439 Return errors when unacknowledged write concerns are passed in