Struct mungos::options::TransactionOptions
source · [−]#[non_exhaustive]pub struct TransactionOptions {
pub read_concern: Option<ReadConcern>,
pub write_concern: Option<WriteConcern>,
pub selection_criteria: Option<SelectionCriteria>,
pub max_commit_time: Option<Duration>,
}
Expand description
Contains the options that can be used for a transaction.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.read_concern: Option<ReadConcern>
The read concern to use for the transaction.
write_concern: Option<WriteConcern>
The write concern to use when committing or aborting a transaction.
selection_criteria: Option<SelectionCriteria>
The selection criteria to use for all read operations in a transaction.
max_commit_time: Option<Duration>
The maximum amount of time to allow a single commitTransaction to run.
Implementations
sourceimpl TransactionOptions
impl TransactionOptions
sourcepub fn builder() -> TransactionOptionsBuilder<((), (), (), ())>
pub fn builder() -> TransactionOptionsBuilder<((), (), (), ())>
Create a builder for building TransactionOptions
.
On the builder, call .read_concern(...)
(optional), .write_concern(...)
(optional), .selection_criteria(...)
(optional), .max_commit_time(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of TransactionOptions
.
Trait Implementations
sourceimpl Clone for TransactionOptions
impl Clone for TransactionOptions
sourcefn clone(&self) -> TransactionOptions
fn clone(&self) -> TransactionOptions
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 moresourceimpl Debug for TransactionOptions
impl Debug for TransactionOptions
sourceimpl Default for TransactionOptions
impl Default for TransactionOptions
sourcefn default() -> TransactionOptions
fn default() -> TransactionOptions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for TransactionOptions
impl<'de> Deserialize<'de> for TransactionOptions
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for TransactionOptions
impl Serialize for TransactionOptions
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
Auto Trait Implementations
impl !RefUnwindSafe for TransactionOptions
impl Send for TransactionOptions
impl Sync for TransactionOptions
impl Unpin for TransactionOptions
impl !UnwindSafe for TransactionOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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