Skip to content

Commit d4e0389

Browse files
Update docs on topology description queries to reflect const-ness (#936)
1 parent 9f5142d commit d4e0389

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

src/libmongoc/doc/includes/cast-away-td-const.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/libmongoc/doc/mongoc_topology_description_has_readable_server.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ Synopsis
1010
1111
bool
1212
mongoc_topology_description_has_readable_server (
13-
mongoc_topology_description_t *td, const mongoc_read_prefs_t *prefs);
13+
const mongoc_topology_description_t *td, const mongoc_read_prefs_t *prefs);
1414
15-
Determines if the topology has a readable server available.
16-
Servers are filtered by the given read preferences only if the driver is connected to a replica set, otherwise the read preferences are ignored.
17-
This function uses the driver's current knowledge of the state of the MongoDB server or servers it is connected to; it does no I/O and it does not block.
15+
Determines if the topology has a readable server available. Servers are filtered
16+
by the given read preferences only if the driver is connected to a replica set,
17+
otherwise the read preferences are ignored. This function uses the driver's
18+
current knowledge of the state of the MongoDB server or servers it is connected
19+
to; it does no I/O and it does not block.
1820

19-
.. |td-func| replace:: ``mongoc_topology_description_has_readable_server``
20-
21-
.. include:: includes/cast-away-td-const.txt
2221

2322
Parameters
2423
----------

src/libmongoc/doc/mongoc_topology_description_has_writable_server.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Synopsis
1212
mongoc_topology_description_has_writable_server (
1313
const mongoc_topology_description_t *td);
1414
15-
Determines if the topology has a writable server available, such as a primary, mongos, or standalone. This function uses the driver's current knowledge of the state of the MongoDB server or servers it is connected to; it does no I/O and it does not block.
15+
Determines if the topology has a writable server available, such as a primary,
16+
mongos, or standalone. This function uses the driver's current knowledge of the
17+
state of the MongoDB server or servers it is connected to; it does no I/O and it
18+
does not block.
1619

17-
.. |td-func| replace:: ``mongoc_topology_description_has_writable_server``
18-
19-
.. include:: includes/cast-away-td-const.txt
2020

2121
Parameters
2222
----------

0 commit comments

Comments
 (0)