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§
source§impl 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§
source§impl Clone for ReadConcern
impl Clone for ReadConcern
source§fn clone(&self) -> ReadConcern
fn clone(&self) -> ReadConcern
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ReadConcern
impl Debug for ReadConcern
source§impl<'de> Deserialize<'de> for ReadConcern
impl<'de> Deserialize<'de> for ReadConcern
source§fn 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>,
source§impl From<ReadConcernLevel> for ReadConcern
impl From<ReadConcernLevel> for ReadConcern
source§fn from(level: ReadConcernLevel) -> ReadConcern
fn from(level: ReadConcernLevel) -> ReadConcern
source§impl PartialEq<ReadConcern> for ReadConcern
impl PartialEq<ReadConcern> for ReadConcern
source§fn eq(&self, other: &ReadConcern) -> bool
fn eq(&self, other: &ReadConcern) -> bool
self
and other
values to be equal, and is used
by ==
.