Struct mongodb::options::WriteConcern [−][src]
Specifies the level of acknowledgement requested from the server for write operations.
See the documentation here for more information about write concerns.
Fields (Non-exhaustive)
Struct {{ .. }}
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.w: Option<Acknowledgment>
Requests acknowledgement that the operation has propagated to a specific number or variety of servers.
w_timeout: Option<Duration>
Specifies a time limit for the write concern. If an operation has not propagated to the requested level within the time limit, an error will return.
Note that an error being returned due to a write concern error does not imply that the write would not have finished propagating if allowed more time to finish, and the server will not roll back the writes that occurred before the timeout was reached.
journal: Option<bool>
Requests acknowledgement that the operation has propagated to the on-disk journal.
Implementations
impl WriteConcern
[src]
pub fn builder() -> WriteConcernBuilder<((), (), ())>
[src]
Create a builder for building WriteConcern
.
On the builder, call .w(...)
(optional), .w_timeout(...)
(optional), .journal(...)
(optional) to set the values of the fields (they accept Into
values).
Finally, call .build()
to create the instance of WriteConcern
.
impl WriteConcern
[src]
pub fn validate(&self) -> Result<()>
[src]
Validates that the write concern. A write concern is invalid if the w
field is 0
and the j
field is true
.
Trait Implementations
impl Clone for WriteConcern
[src]
fn clone(&self) -> WriteConcern
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WriteConcern
[src]
impl Default for WriteConcern
[src]
fn default() -> WriteConcern
[src]
impl<'de> Deserialize<'de> for WriteConcern
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<WriteConcern> for WriteConcern
[src]
fn eq(&self, other: &WriteConcern) -> bool
[src]
fn ne(&self, other: &WriteConcern) -> bool
[src]
impl Serialize for WriteConcern
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for WriteConcern
[src]
Auto Trait Implementations
impl RefUnwindSafe for WriteConcern
[src]
impl Send for WriteConcern
[src]
impl Sync for WriteConcern
[src]
impl Unpin for WriteConcern
[src]
impl UnwindSafe for WriteConcern
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,