#[non_exhaustive]pub struct TransactionOptions {
pub exclude_txn_from_change_streams: bool,
pub isolation_level: IsolationLevel,
pub mode: Option<Mode>,
/* private fields */
}Expand description
Options to use for transactions.
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.exclude_txn_from_change_streams: boolWhen exclude_txn_from_change_streams is set to true, it prevents read
or write transactions from being tracked in change streams.
-
If the DDL option
allow_txn_exclusionis set totrue, then the updates made within this transaction aren’t recorded in the change stream. -
If you don’t set the DDL option
allow_txn_exclusionor if it’s set tofalse, then the updates made within this transaction are recorded in the change stream.
When exclude_txn_from_change_streams is set to false or not set,
modifications from this transaction are recorded in all change streams
that are tracking columns modified by these transactions.
The exclude_txn_from_change_streams option can only be specified
for read-write or partitioned DML transactions, otherwise the API returns
an INVALID_ARGUMENT error.
isolation_level: IsolationLevelIsolation level for the transaction.
mode: Option<Mode>Required. The type of transaction.
Implementations§
Source§impl TransactionOptions
impl TransactionOptions
Sourcepub fn set_exclude_txn_from_change_streams<T: Into<bool>>(self, v: T) -> Self
pub fn set_exclude_txn_from_change_streams<T: Into<bool>>(self, v: T) -> Self
Sets the value of exclude_txn_from_change_streams.
Sourcepub fn set_isolation_level<T: Into<IsolationLevel>>(self, v: T) -> Self
pub fn set_isolation_level<T: Into<IsolationLevel>>(self, v: T) -> Self
Sets the value of isolation_level.
Sourcepub fn set_mode<T: Into<Option<Mode>>>(self, v: T) -> Self
pub fn set_mode<T: Into<Option<Mode>>>(self, v: T) -> Self
Sets the value of mode.
Note that all the setters affecting mode are mutually
exclusive.
Sourcepub fn read_write(&self) -> Option<&Box<ReadWrite>>
pub fn read_write(&self) -> Option<&Box<ReadWrite>>
The value of mode
if it holds a ReadWrite, None if the field is not set or
holds a different branch.
Sourcepub fn set_read_write<T: Into<Box<ReadWrite>>>(self, v: T) -> Self
pub fn set_read_write<T: Into<Box<ReadWrite>>>(self, v: T) -> Self
Sets the value of mode
to hold a ReadWrite.
Note that all the setters affecting mode are
mutually exclusive.
Sourcepub fn partitioned_dml(&self) -> Option<&Box<PartitionedDml>>
pub fn partitioned_dml(&self) -> Option<&Box<PartitionedDml>>
The value of mode
if it holds a PartitionedDml, None if the field is not set or
holds a different branch.
Sourcepub fn set_partitioned_dml<T: Into<Box<PartitionedDml>>>(self, v: T) -> Self
pub fn set_partitioned_dml<T: Into<Box<PartitionedDml>>>(self, v: T) -> Self
Sets the value of mode
to hold a PartitionedDml.
Note that all the setters affecting mode are
mutually exclusive.
Trait Implementations§
Source§impl Clone for TransactionOptions
impl Clone for TransactionOptions
Source§fn clone(&self) -> TransactionOptions
fn clone(&self) -> TransactionOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransactionOptions
impl Debug for TransactionOptions
Source§impl Default for TransactionOptions
impl Default for TransactionOptions
Source§fn default() -> TransactionOptions
fn default() -> TransactionOptions
Source§impl Message for TransactionOptions
impl Message for TransactionOptions
Source§impl PartialEq for TransactionOptions
impl PartialEq for TransactionOptions
Source§fn eq(&self, other: &TransactionOptions) -> bool
fn eq(&self, other: &TransactionOptions) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TransactionOptions
Auto Trait Implementations§
impl Freeze for TransactionOptions
impl RefUnwindSafe for TransactionOptions
impl Send for TransactionOptions
impl Sync for TransactionOptions
impl Unpin for TransactionOptions
impl UnsafeUnpin for TransactionOptions
impl UnwindSafe for TransactionOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request