Enum mongo_driver::read_prefs::ReadMode
[−]
[src]
pub enum ReadMode { Primary, Secondary, PrimaryPreferred, SecondaryPreferred, Nearest, }
Describes how reads should be dispatched.
Variants
Primary
Default mode. All operations read from the current replica set primary.
Secondary
All operations read from among the nearest secondary members of the replica set.
PrimaryPreferred
In most situations, operations read from the primary but if it is unavailable, operations read from secondary members.
SecondaryPreferred
In most situations, operations read from among the nearest secondary members, but if no secondaries are available, operations read from the primary.
Nearest
Operations read from among the nearest members of the replica set, irrespective of the member’s type.