Struct mungos::options::ReadConcern
source · [−]#[non_exhaustive]pub struct ReadConcern {
pub level: ReadConcernLevel,
}
Expand description
Specifies the consistency and isolation properties of read operations from replica sets and replica set shards.
See the documentation here for more information about read concerns.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.level: ReadConcernLevel
The level of the read concern.
Implementations
sourceimpl ReadConcern
impl ReadConcern
sourcepub fn majority() -> ReadConcern
pub fn majority() -> ReadConcern
Creates a read concern with level “majority”. See the specific documentation for this read concern level here.
sourcepub fn local() -> ReadConcern
pub fn local() -> ReadConcern
Creates a read concern with level “local”. See the specific documentation for this read concern level here.
sourcepub fn linearizable() -> ReadConcern
pub fn linearizable() -> ReadConcern
Creates a read concern with level “linearizable”. See the specific documentation for this read concern level here.
sourcepub fn available() -> ReadConcern
pub fn available() -> ReadConcern
Creates a read concern with level “available”. See the specific documentation for this read concern level here.
sourcepub fn snapshot() -> ReadConcern
pub fn snapshot() -> ReadConcern
Creates a read concern with level “snapshot”. See the specific documentation for this read concern level here.
sourcepub fn custom(level: String) -> ReadConcern
pub fn custom(level: String) -> ReadConcern
Creates a read concern with a custom read concern level. This is present to provide forwards compatibility with any future read concerns which may be added to new versions of MongoDB.
Trait Implementations
sourceimpl Clone for ReadConcern
impl Clone for ReadConcern
sourcefn clone(&self) -> ReadConcern
fn clone(&self) -> ReadConcern
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 ReadConcern
impl Debug for ReadConcern
sourceimpl<'de> Deserialize<'de> for ReadConcern
impl<'de> Deserialize<'de> for ReadConcern
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ReadConcern, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ReadConcern, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<ReadConcernLevel> for ReadConcern
impl From<ReadConcernLevel> for ReadConcern
sourcefn from(level: ReadConcernLevel) -> ReadConcern
fn from(level: ReadConcernLevel) -> ReadConcern
Converts to this type from the input type.
sourceimpl PartialEq<ReadConcern> for ReadConcern
impl PartialEq<ReadConcern> for ReadConcern
sourcefn eq(&self, other: &ReadConcern) -> bool
fn eq(&self, other: &ReadConcern) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ReadConcern) -> bool
fn ne(&self, other: &ReadConcern) -> bool
This method tests for !=
.
sourceimpl Serialize for ReadConcern
impl Serialize for ReadConcern
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 ReadConcern
Auto Trait Implementations
impl RefUnwindSafe for ReadConcern
impl Send for ReadConcern
impl Sync for ReadConcern
impl Unpin for ReadConcern
impl UnwindSafe for ReadConcern
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