[−][src]Enum mongodb::options::ReadPreference
Specifies how the driver should route a read operation to members of a replica set.
If applicable, tag_sets
can be used to target specific nodes in a replica set, and
max_staleness
specifies the maximum lag behind the primary that a secondary can be to remain
eligible for the operation. The max staleness value maps to the maxStalenessSeconds
MongoDB
option and will be sent to the server as an integer number of seconds.
See the MongoDB docs for more details.
Variants
Only route this operation to the primary.
Only route this operation to a secondary.
Fields of Secondary
options: ReadPreferenceOptions
Route this operation to the primary if it's available, but fall back to the secondaries if not.
Fields of PrimaryPreferred
options: ReadPreferenceOptions
Route this operation to a secondary if one is available, but fall back to the primary if not.
Fields of SecondaryPreferred
options: ReadPreferenceOptions
Route this operation to the node with the least network latency regardless of whether it's the primary or a secondary.
Fields of Nearest
options: ReadPreferenceOptions
Trait Implementations
impl Clone for ReadPreference
[src]
fn clone(&self) -> ReadPreference
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ReadPreference
[src]
impl From<ReadPreference> for SelectionCriteria
[src]
fn from(read_pref: ReadPreference) -> Self
[src]
impl PartialEq<ReadPreference> for ReadPreference
[src]
fn eq(&self, other: &ReadPreference) -> bool
[src]
fn ne(&self, other: &ReadPreference) -> bool
[src]
impl StructuralPartialEq for ReadPreference
[src]
Auto Trait Implementations
impl RefUnwindSafe for ReadPreference
impl Send for ReadPreference
impl Sync for ReadPreference
impl Unpin for ReadPreference
impl UnwindSafe for ReadPreference
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,