Struct mongodb::options::TransactionOptions [−][src]
#[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>,
}
tokio-runtime
and non-crate feature async-std-runtime
, or non-crate feature tokio-runtime
and crate feature async-std-runtime
only.Expand description
Contains the options that can be used for a transaction.
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.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
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
Returns the “default value” for a type. Read more
fn 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
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
Mutably borrows from an owned value. Read more