Skip to content

Commit 34ebd8f

Browse files
authored
MW Proofreading edits (#59)
1 parent f3d9d47 commit 34ebd8f

23 files changed

+281
-165
lines changed

source/fundamentals/aggregation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Aggregation
1313
Overview
1414
--------
1515

16-
In this guide, you can learn how to perform **aggregation operations** in
16+
In this guide, you can learn how to perform aggregation operations in
1717
the {+driver-short+}.
1818

1919
Aggregation operations process data in your MongoDB collections based on

source/fundamentals/authentication.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Authentication Mechanisms
1313
Overview
1414
--------
1515

16-
In this guide, you can learn how to use the **authentication
17-
mechanisms** available in the MongoDB Community Edition. When you connect
16+
In this guide, you can learn how to use the authentication
17+
mechanisms available in the MongoDB Community Edition. When you connect
1818
to MongoDB, you can use an authentication mechanism to establish trust
1919
between the driver and the server.
2020

@@ -162,11 +162,11 @@ The driver obtains the credentials only from the first source in which
162162
they are found. The driver checks for your credentials from the following
163163
sources in the following order:
164164

165-
1. ``Credential`` struct or connection string
166-
#. Environment variables
167-
#. Web identity token file
165+
1. ``Credential`` struct or connection string.
166+
#. Environment variables.
167+
#. Web identity token file.
168168
#. AWS ECS endpoint specified in the ``AWS_CONTAINER_CREDENTIALS_RELATIVE_URI``
169-
environment variable
169+
environment variable.
170170
#. AWS EC2 endpoint. For more information, see `IAM Roles for Tasks
171171
<https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html>`__
172172
in the AWS documentation.
@@ -275,11 +275,6 @@ The ``MONGODB-X509`` authentication mechanism uses Transport Level Security (TLS
275275
with X.509 certificates to authenticate your user, which is identified
276276
by the relative distinguished names (RDNs) of your client certificate.
277277

278-
.. tip::
279-
280-
To learn more about TLS, see the Wikipedia entry on
281-
:wikipedia:`Transport Layer Security <w/index.php?title=Transport_Layer_Security&oldid=1172659512>`.
282-
283278
When you specify this authentication mechanism, the server authenticates
284279
the connection by reading the following files:
285280

source/fundamentals/connections.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Connections
2323
Overview
2424
--------
2525

26-
Learn how to configure your application's connection to a MongoDB
27-
deployment using the {+driver-short+} in the following sections:
26+
Learn how to use the {+driver-short+} to configure your application's
27+
connection to a MongoDB deployment in the following sections:
2828

2929
- :ref:`Connection Guide <rust-connect-to-mongodb>`
3030
- :ref:`Connection Options <rust-connection-options>`

source/fundamentals/connections/connection-guide.txt

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,22 @@ options. In the example, we set two connection options:
8484
MongoDB 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
8888
client 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+
100103
You can create a client that uses your connection string and other
101104
client options by passing a ``ClientOptions`` object to the ``with_options()``
102105
method.
@@ -111,11 +114,13 @@ connection string to the ``Client::with_uri_str()`` method.
111114
To 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
125130
The following code shows how you can create a client that uses an Atlas
126131
connection string and the {+stable-api+} version, connect to MongoDB, and
127132
verify 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
129134
connection 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.
162167
Other 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
166171
that is not hosted on Atlas, see the following sections to find out how to
167172
connect.
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

209214
Direct Connection
210215
`````````````````

source/fundamentals/connections/connection-options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ connected to the server.
220220
- Integer between -1 and 9 (inclusive)
221221
- ``-1``
222222
- | Specifies the level field of the ``zlib`` compression if you use that compressor.
223-
| Setting a value of``-1`` selects the default compression level (``6``).
223+
| Setting a value of ``-1`` selects the default compression level (``6``).
224224
| Setting a value of ``0`` specifies no compression, and setting
225225
a value of ``9`` specifies maximum compression.
226226
| To learn more about network compression, see the :ref:`rust-network-compression` guide.

source/fundamentals/connections/network-compression.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,26 @@ possible values:
149149
- ``Compressor::Zlib { level: <integer> }``
150150

151151
For the compressors that have a ``level`` field, set the value to
152-
``None`` to indicate the default level. A higher ``level`` value
153-
results in more compression, which is slower.
152+
``None`` to indicate the default level. The following table describes the
153+
default and accepted compression levels for Zlib and Zstandard:
154+
155+
.. list-table::
156+
:header-rows: 1
157+
:widths: 30 30 40
158+
159+
* - Compressor
160+
- Default Level
161+
- Accepted Levels
162+
163+
* - Zlib
164+
- ``6``
165+
- Integers from ``0`` to ``9`` or ``None``
166+
167+
* - Zstandard
168+
- ``3``
169+
- Integers from ``1`` to ``22`` or ``None``
170+
171+
A higher ``level`` value results in more compression, which is slower.
154172

155173
The following example shows how to specify Snappy, Zlib, and
156174
Zstandard as the compressors for a connection:

0 commit comments

Comments
 (0)