@@ -84,19 +84,22 @@ options. In the example, we set two connection options:
8484MongoDB Client
8585--------------
8686
87- To connect to MongoDB, you need to create a ``Client`` instance. A
87+ To connect to MongoDB, you must create a ``Client`` instance. A
8888client manages your connections and runs database commands.
8989
9090.. tip:: Reuse Your Client
9191
92- We recommend that you reuse your client across sessions and operations.
92+ You can improve performance by reusing your client across sessions and operations.
9393 You can use the same ``Client`` instance to perform multiple tasks, instead of
9494 creating a new one each time. The ``Client`` type is safe for
9595 concurrent use by multiple threads or async tasks.
9696
9797 .. TODO To learn more about how connection pools work in the driver, see
9898 .. the :ref:`FAQ page <rust-faq-connection-pool>`.
9999
100+ Client Creation Methods
101+ ~~~~~~~~~~~~~~~~~~~~~~~
102+
100103You can create a client that uses your connection string and other
101104client options by passing a ``ClientOptions`` object to the ``with_options()``
102105method.
@@ -111,11 +114,13 @@ connection string to the ``Client::with_uri_str()`` method.
111114To learn more about creating a client, see the API documentation for `Client
112115<{+api+}/struct.Client.html>`__ and `with_options() <{+api+}/struct.Client.html#method.with_options>`__.
113116
114- You can set the {+stable-api+} version as an option to avoid
115- breaking changes when you upgrade to a new server version.
117+ .. tip:: Stable API
116118
117- To learn more about the {+stable-api+} feature, see the
118- :ref:`{+stable-api+} <rust-stable-api>` guide.
119+ You can set the {+stable-api+} version as an option to avoid
120+ breaking changes when you upgrade to a new server version.
121+
122+ To learn more about the {+stable-api+} feature, see the
123+ :ref:`{+stable-api+} <rust-stable-api>` guide.
119124
120125.. _rust-atlas-connection-example:
121126
@@ -125,21 +130,21 @@ Connection Example
125130The following code shows how you can create a client that uses an Atlas
126131connection string and the {+stable-api+} version, connect to MongoDB, and
127132verify that the connection is successful. Select from the
128- :guilabel:`Sync ` or :guilabel:`Async ` tabs below for corresponding
133+ :guilabel:`Asynchronous API ` or :guilabel:`Synchronous API ` tabs below for corresponding
129134connection code samples.
130135
131136.. TODO To learn more about asynchronous and synchronous runtimes, see the
132137.. :ref:`Runtimes <link>` guide.
133138
134139.. tabs::
135140
136- .. tab:: Async
141+ .. tab:: Asynchronous API
137142 :tabid: rust-async
138143
139144 .. literalinclude:: /includes/fundamentals/code-snippets/connection-async.rs
140145 :language: rust
141146
142- .. tab:: Sync
147+ .. tab:: Synchronous API
143148 :tabid: rust-sync
144149
145150 .. literalinclude:: /includes/fundamentals/code-snippets/connection-sync.rs
@@ -162,7 +167,7 @@ connection code samples.
162167Other Ways to Connect to MongoDB
163168--------------------------------
164169
165- If you need to connect to a single MongoDB server instance or replica set
170+ If you must connect to a single MongoDB server instance or replica set
166171that is not hosted on Atlas, see the following sections to find out how to
167172connect.
168173
@@ -202,9 +207,9 @@ When connecting to a replica set, the driver takes the following actions by defa
202207
203208.. tip::
204209
205- You only need to specify one host to connect to a replica set.
210+ You are only required to specify one host to connect to a replica set.
206211 However, to ensure connectivity when the specified host
207- is unavailable, you should provide the full list of hosts.
212+ is unavailable, provide the full list of hosts.
208213
209214Direct Connection
210215`````````````````
0 commit comments