Struct mongodb::common::ReadPreference [] [src]

pub struct ReadPreference {
    pub mode: ReadMode,
    pub tag_sets: Vec<BTreeMap<StringString>>,
}

Fields

mode: ReadMode

Indicates how a server should be selected during read operations.

tag_sets: Vec<BTreeMap<StringString>>

Filters servers based on the first tag set that matches at least one server.

Methods

impl ReadPreference
[src]

fn new(mode: ReadMode, tag_sets: Option<Vec<BTreeMap<StringString>>>) -> ReadPreference

fn to_document(&self) -> Document

Trait Implementations

impl Clone for ReadPreference
[src]

fn clone(&self) -> ReadPreference

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for ReadPreference
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.