From e887113b63aea62df6dfa673a94f8f9958c652ac Mon Sep 17 00:00:00 2001 From: Thijs Cadier Date: Sat, 23 Jan 2016 17:17:06 +0100 Subject: [PATCH] Document read pref options --- src/read_prefs.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/read_prefs.rs b/src/read_prefs.rs index d917e20..5cc9888 100644 --- a/src/read_prefs.rs +++ b/src/read_prefs.rs @@ -4,10 +4,15 @@ use mongoc::bindings; /// Describes how reads should be dispatched. pub enum ReadMode { + /// Default mode. All operations read from the current replica set primary. Primary, + /// All operations read from among the nearest secondary members of the replica set. Secondary, + /// In most situations, operations read from the primary but if it is unavailable, operations read from secondary members. PrimaryPreferred, + /// In most situations, operations read from among the nearest secondary members, but if no secondaries are available, operations read from the primary. SecondaryPreferred, + /// Operations read from among the nearest members of the replica set, irrespective of the member’s type. Nearest }