Struct mungos::options::HedgedReadOptions
source · [−]#[non_exhaustive]pub struct HedgedReadOptions {
pub enabled: bool,
}
Expand description
Specifies hedging behavior for reads.
See the MongoDB docs for more details.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.enabled: bool
Whether or not to allow reads from a sharded cluster to be “hedged” across two replica set members per shard, with the results from the first response received back from either being returned.
Implementations
sourceimpl HedgedReadOptions
impl HedgedReadOptions
sourcepub fn with_enabled(enabled: bool) -> HedgedReadOptions
pub fn with_enabled(enabled: bool) -> HedgedReadOptions
Creates a new HedgedReadOptions
with the given value for enabled
.
Trait Implementations
sourceimpl Clone for HedgedReadOptions
impl Clone for HedgedReadOptions
sourcefn clone(&self) -> HedgedReadOptions
fn clone(&self) -> HedgedReadOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HedgedReadOptions
impl Debug for HedgedReadOptions
sourceimpl<'de> Deserialize<'de> for HedgedReadOptions
impl<'de> Deserialize<'de> for HedgedReadOptions
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<HedgedReadOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<HedgedReadOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<HedgedReadOptions> for HedgedReadOptions
impl PartialEq<HedgedReadOptions> for HedgedReadOptions
sourcefn eq(&self, other: &HedgedReadOptions) -> bool
fn eq(&self, other: &HedgedReadOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HedgedReadOptions) -> bool
fn ne(&self, other: &HedgedReadOptions) -> bool
This method tests for !=
.
sourceimpl Serialize for HedgedReadOptions
impl Serialize for HedgedReadOptions
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for HedgedReadOptions
Auto Trait Implementations
impl RefUnwindSafe for HedgedReadOptions
impl Send for HedgedReadOptions
impl Sync for HedgedReadOptions
impl Unpin for HedgedReadOptions
impl UnwindSafe for HedgedReadOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more