#[non_exhaustive]pub enum Mode {
ReadWrite(Box<ReadWrite>),
PartitionedDml(Box<PartitionedDml>),
ReadOnly(Box<ReadOnly>),
}Expand description
Required. The type of transaction.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ReadWrite(Box<ReadWrite>)
Transaction may write.
Authorization to begin a read-write transaction requires
spanner.databases.beginOrRollbackReadWriteTransaction permission
on the session resource.
PartitionedDml(Box<PartitionedDml>)
Partitioned DML transaction.
Authorization to begin a Partitioned DML transaction requires
spanner.databases.beginPartitionedDmlTransaction permission
on the session resource.
ReadOnly(Box<ReadOnly>)
Transaction does not write.
Authorization to begin a read-only transaction requires
spanner.databases.beginReadOnlyTransaction permission
on the session resource.
Implementations§
Source§impl Mode
impl Mode
Sourcepub fn from_read_write(value: impl Into<Box<ReadWrite>>) -> Self
pub fn from_read_write(value: impl Into<Box<ReadWrite>>) -> Self
Initializes the enum to the ReadWrite branch.
Sourcepub fn from_partitioned_dml(value: impl Into<Box<PartitionedDml>>) -> Self
pub fn from_partitioned_dml(value: impl Into<Box<PartitionedDml>>) -> Self
Initializes the enum to the PartitionedDml branch.
Trait Implementations§
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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
Mutably borrows from an owned value. Read more
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,
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>
Wrap the input message
T in a tonic::Request