[−][src]Struct mongodb::options::WriteConcern
Specifies the level of acknowledgement requested from the server for write operations.
See the documentation here for more information about write concerns.
Fields
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.
Methods
impl WriteConcern
[src]
pub fn builder() -> TypedBuilder_BuilderFor_WriteConcern<(), (), ()>
[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]
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 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
impl Send for WriteConcern
impl Sync for WriteConcern
impl Unpin for WriteConcern
impl UnwindSafe for WriteConcern
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[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.
fn to_owned(&self) -> T
[src]
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.
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.
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>,