Struct mongodb::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() -> Self
pub fn majority() -> Self
Creates a read concern with level “majority”. See the specific documentation for this read concern level here.
sourcepub fn local() -> Self
pub fn local() -> Self
Creates a read concern with level “local”. See the specific documentation for this read concern level here.
sourcepub fn linearizable() -> Self
pub fn linearizable() -> Self
Creates a read concern with level “linearizable”. See the specific documentation for this read concern level here.
sourcepub fn available() -> Self
pub fn available() -> Self
Creates a read concern with level “available”. See the specific documentation for this read concern level here.
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<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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) -> Self
fn from(level: ReadConcernLevel) -> Self
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
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more