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

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

Fields

mode: ReadMode

Indicates how a server should be selected during read operations.

tag_sets: Vec<BTreeMap<String, String>>

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

Methods

impl ReadPreference[src]

pub fn new(
    mode: ReadMode,
    tag_sets: Option<Vec<BTreeMap<String, String>>>
) -> ReadPreference
[src]

pub fn to_document(&self) -> Document[src]

Trait Implementations

impl Eq for ReadPreference[src]

impl Clone for ReadPreference[src]

impl PartialOrd<ReadPreference> for ReadPreference[src]

impl Ord for ReadPreference[src]

impl PartialEq<ReadPreference> for ReadPreference[src]

impl Hash for ReadPreference[src]

impl Debug for ReadPreference[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self