Enum mongo_driver::read_prefs::ReadMode [] [src]

pub enum ReadMode {
    Primary,
    Secondary,
    PrimaryPreferred,
    SecondaryPreferred,
    Nearest,
}

Describes how reads should be dispatched.

Variants

Default mode. All operations read from the current replica set primary.

All operations read from among the nearest secondary members of the replica set.

In most situations, operations read from the primary but if it is unavailable, operations read from secondary members.

In most situations, operations read from among the nearest secondary members, but if no secondaries are available, operations read from the primary.

Operations read from among the nearest members of the replica set, irrespective of the member’s type.

Trait Implementations

Auto Trait Implementations

impl Send for ReadMode

impl Sync for ReadMode