@@ -20,10 +20,70 @@ What's New
2020Learn about new features, improvements, and fixes introduced in the
2121following versions of the {+driver-long+}:
2222
23+ * :ref:`Version 3.0 <rust-version-3.0>`
2324* :ref:`Version 2.8 <rust-version-2.8>`
2425* :ref:`Version 2.7 <rust-version-2.7>`
2526* :ref:`Version 2.6 <rust-version-2.6>`
2627
28+ .. _rust-version-3.0:
29+
30+ What's New in 3.0
31+ -----------------
32+
33+ The {+driver-short+} v3.0 release includes the following features, improvements, and fixes:
34+
35+ - Implements a fluent API, which introduces the following syntax changes for passing options and
36+ starting sessions:
37+
38+ - To set asynchronous method options, chain option builder methods directly to the method call
39+ instead of passing an options struct parameter.
40+
41+ - To set synchronous method options, chain option builder methods to the method call, then
42+ call the ``run()`` method.
43+
44+ - If you must construct a separate options struct, chain the ``with_options()``
45+ method to the method call and pass your options struct as a parameter.
46+
47+ - To start a session, chain the ``session()`` method to the method call instead of using a separate
48+ method that has a ``_with_session`` suffix.
49+
50+ - Adds support for bulk write operations. To learn more about these operations, see the
51+ :ref:`rust-bulk-guide` guide.
52+
53+ - Introduces the ``EventHandler`` type to reduce the amount of boilerplate code required for event monitoring.
54+ For examples that use the ``EventHandler`` type, see the :ref:`rust-monitoring` guides.
55+
56+ - Removes support for the ``async-std`` asynchronous runtime. To learn more about this change, see
57+ the :ref:`rust-runtimes-configure-async` section of the Asynchronous and Synchronous APIs guide.
58+
59+ - Requires the use of a ``compat`` feature if a {+driver-short+} application is compiled with
60+ the ``no-default-features`` command line flag. The ``rustls`` and ``dns-resolution`` features
61+ are now optional.
62+
63+ - Removes support for the ``bson-*`` driver features. You can select these features by including
64+ ``bson`` as a direct dependency in your application.
65+
66+ - Removes support for read and write concern constants. Instead, use helper methods to set ``ReadConcern`` and
67+ ``WriteConcern`` values.
68+
69+ - Adds ``Send + Sync`` constraints to the ``Collection<T>`` type.
70+
71+ - Removes the ``ClientOptions::compressor`` field if no compressor features are enabled.
72+
73+ - Changes the type of ``ReadPreferenceOptions`` fields. These fields now have a ``Option<ReadPreferenceOptions>`` type.
74+
75+ - Removes the ``CollectionOptions::human_readable_serialization`` option. Instead, use the ``bson::HumanReadable``
76+ wrapper type to serialize user data into human-readable form.
77+
78+ - Adds support for value conversion through the ``Into`` trait for all option struct builders.
79+
80+ - Renames the ``comment_bson`` field to ``comment`` for ``AggregateOptions``, ``FindOptions``, and ``FindOneOptions``
81+ structs.
82+
83+ To learn more about this release, see the `v3.0 Migration Guide
84+ <https://github.com/mongodb/mongo-rust-driver/blob/main/migration-3.0.md>`__
85+ on GitHub.
86+
2787.. _rust-version-2.8:
2888
2989What's New in 2.8
0 commit comments