#[non_exhaustive]pub struct BeginTransactionRequest {
pub session: String,
pub options: Option<TransactionOptions>,
pub request_options: Option<RequestOptions>,
pub mutation_key: Option<Mutation>,
pub routing_hint: Option<RoutingHint>,
/* private fields */
}Expand description
The request for BeginTransaction.
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.session: StringRequired. The session in which the transaction runs.
options: Option<TransactionOptions>Required. Options for the new transaction.
request_options: Option<RequestOptions>Common options for this request.
Priority is ignored for this request. Setting the priority in this
request_options struct doesn’t do anything. To set the priority for a
transaction, set it on the reads and writes that are part of this
transaction instead.
mutation_key: Option<Mutation>Optional. Required for read-write transactions on a multiplexed session that commit mutations but don’t perform any reads or queries. You must randomly select one of the mutations from the mutation set and send it as a part of this request.
routing_hint: Option<RoutingHint>Optional. Makes the Spanner requests location-aware if present.
It gives the server hints that can be used to route the request to an appropriate server, potentially significantly decreasing latency and improving throughput. To achieve improved performance, most fields must be filled in with accurate values.
Implementations§
Source§impl BeginTransactionRequest
impl BeginTransactionRequest
Sourcepub fn set_session<T: Into<String>>(self, v: T) -> Self
pub fn set_session<T: Into<String>>(self, v: T) -> Self
Sets the value of session.
Sourcepub fn set_options<T>(self, v: T) -> Selfwhere
T: Into<TransactionOptions>,
pub fn set_options<T>(self, v: T) -> Selfwhere
T: Into<TransactionOptions>,
Sets the value of options.
Sourcepub fn set_or_clear_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<TransactionOptions>,
pub fn set_or_clear_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<TransactionOptions>,
Sets or clears the value of options.
Sourcepub fn set_request_options<T>(self, v: T) -> Selfwhere
T: Into<RequestOptions>,
pub fn set_request_options<T>(self, v: T) -> Selfwhere
T: Into<RequestOptions>,
Sets the value of request_options.
Sourcepub fn set_or_clear_request_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestOptions>,
pub fn set_or_clear_request_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestOptions>,
Sets or clears the value of request_options.
Sourcepub fn set_mutation_key<T>(self, v: T) -> Self
pub fn set_mutation_key<T>(self, v: T) -> Self
Sets the value of mutation_key.
Sourcepub fn set_or_clear_mutation_key<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mutation_key<T>(self, v: Option<T>) -> Self
Sets or clears the value of mutation_key.
Sourcepub fn set_routing_hint<T>(self, v: T) -> Selfwhere
T: Into<RoutingHint>,
pub fn set_routing_hint<T>(self, v: T) -> Selfwhere
T: Into<RoutingHint>,
Sets the value of routing_hint.
Sourcepub fn set_or_clear_routing_hint<T>(self, v: Option<T>) -> Selfwhere
T: Into<RoutingHint>,
pub fn set_or_clear_routing_hint<T>(self, v: Option<T>) -> Selfwhere
T: Into<RoutingHint>,
Sets or clears the value of routing_hint.
Trait Implementations§
Source§impl Clone for BeginTransactionRequest
impl Clone for BeginTransactionRequest
Source§fn clone(&self) -> BeginTransactionRequest
fn clone(&self) -> BeginTransactionRequest
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 BeginTransactionRequest
impl Debug for BeginTransactionRequest
Source§impl Default for BeginTransactionRequest
impl Default for BeginTransactionRequest
Source§fn default() -> BeginTransactionRequest
fn default() -> BeginTransactionRequest
Source§impl Message for BeginTransactionRequest
impl Message for BeginTransactionRequest
Source§impl PartialEq for BeginTransactionRequest
impl PartialEq for BeginTransactionRequest
Source§fn eq(&self, other: &BeginTransactionRequest) -> bool
fn eq(&self, other: &BeginTransactionRequest) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BeginTransactionRequest
Auto Trait Implementations§
impl !Freeze for BeginTransactionRequest
impl RefUnwindSafe for BeginTransactionRequest
impl Send for BeginTransactionRequest
impl Sync for BeginTransactionRequest
impl Unpin for BeginTransactionRequest
impl UnsafeUnpin for BeginTransactionRequest
impl UnwindSafe for BeginTransactionRequest
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