#[non_exhaustive]pub struct CommitResponse {
pub commit_timestamp: Option<Timestamp>,
pub commit_stats: Option<CommitStats>,
pub snapshot_timestamp: Option<Timestamp>,
pub cache_update: Option<CacheUpdate>,
pub isolation_level: IsolationLevel,
pub read_lock_mode: ReadLockMode,
pub multiplexed_session_retry: Option<MultiplexedSessionRetry>,
/* private fields */
}Expand description
The response for Commit.
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.commit_timestamp: Option<Timestamp>The Cloud Spanner timestamp at which the transaction committed.
commit_stats: Option<CommitStats>The statistics about this Commit. Not returned by default.
For more information, see
CommitRequest.return_commit_stats.
snapshot_timestamp: Option<Timestamp>If TransactionOptions.isolation_level is set to
IsolationLevel.REPEATABLE_READ, then the snapshot timestamp is the
timestamp at which all reads in the transaction ran. This timestamp is
never returned.
cache_update: Option<CacheUpdate>Optional. A cache update expresses a set of changes the client should
incorporate into its location cache. The client should discard the changes
if they are older than the data it already has. This data can be obtained
in response to requests that included a RoutingHint field, but may also
be obtained by explicit location-fetching RPCs which may be added in the
future.
isolation_level: IsolationLevelThe isolation level used for the read-write transaction.
read_lock_mode: ReadLockModeThe read lock mode used for the read-write transaction.
multiplexed_session_retry: Option<MultiplexedSessionRetry>You must examine and retry the commit if the following is populated.
Implementations§
Source§impl CommitResponse
impl CommitResponse
Sourcepub fn set_commit_timestamp<T>(self, v: T) -> Self
pub fn set_commit_timestamp<T>(self, v: T) -> Self
Sets the value of commit_timestamp.
Sourcepub fn set_or_clear_commit_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_commit_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of commit_timestamp.
Sourcepub fn set_commit_stats<T>(self, v: T) -> Selfwhere
T: Into<CommitStats>,
pub fn set_commit_stats<T>(self, v: T) -> Selfwhere
T: Into<CommitStats>,
Sets the value of commit_stats.
Sourcepub fn set_or_clear_commit_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommitStats>,
pub fn set_or_clear_commit_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommitStats>,
Sets or clears the value of commit_stats.
Sourcepub fn set_snapshot_timestamp<T>(self, v: T) -> Self
pub fn set_snapshot_timestamp<T>(self, v: T) -> Self
Sets the value of snapshot_timestamp.
Sourcepub fn set_or_clear_snapshot_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_snapshot_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of snapshot_timestamp.
Sourcepub fn set_cache_update<T>(self, v: T) -> Selfwhere
T: Into<CacheUpdate>,
pub fn set_cache_update<T>(self, v: T) -> Selfwhere
T: Into<CacheUpdate>,
Sets the value of cache_update.
Sourcepub fn set_or_clear_cache_update<T>(self, v: Option<T>) -> Selfwhere
T: Into<CacheUpdate>,
pub fn set_or_clear_cache_update<T>(self, v: Option<T>) -> Selfwhere
T: Into<CacheUpdate>,
Sets or clears the value of cache_update.
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_read_lock_mode<T: Into<ReadLockMode>>(self, v: T) -> Self
pub fn set_read_lock_mode<T: Into<ReadLockMode>>(self, v: T) -> Self
Sets the value of read_lock_mode.
Sourcepub fn set_multiplexed_session_retry<T: Into<Option<MultiplexedSessionRetry>>>(
self,
v: T,
) -> Self
pub fn set_multiplexed_session_retry<T: Into<Option<MultiplexedSessionRetry>>>( self, v: T, ) -> Self
Sets the value of multiplexed_session_retry.
Note that all the setters affecting multiplexed_session_retry are mutually
exclusive.
Sourcepub fn precommit_token(&self) -> Option<&Box<MultiplexedSessionPrecommitToken>>
pub fn precommit_token(&self) -> Option<&Box<MultiplexedSessionPrecommitToken>>
The value of multiplexed_session_retry
if it holds a PrecommitToken, None if the field is not set or
holds a different branch.
Sourcepub fn set_precommit_token<T: Into<Box<MultiplexedSessionPrecommitToken>>>(
self,
v: T,
) -> Self
pub fn set_precommit_token<T: Into<Box<MultiplexedSessionPrecommitToken>>>( self, v: T, ) -> Self
Sets the value of multiplexed_session_retry
to hold a PrecommitToken.
Note that all the setters affecting multiplexed_session_retry are
mutually exclusive.
Trait Implementations§
Source§impl Clone for CommitResponse
impl Clone for CommitResponse
Source§fn clone(&self) -> CommitResponse
fn clone(&self) -> CommitResponse
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 CommitResponse
impl Debug for CommitResponse
Source§impl Default for CommitResponse
impl Default for CommitResponse
Source§fn default() -> CommitResponse
fn default() -> CommitResponse
Source§impl Message for CommitResponse
impl Message for CommitResponse
Source§impl PartialEq for CommitResponse
impl PartialEq for CommitResponse
Source§fn eq(&self, other: &CommitResponse) -> bool
fn eq(&self, other: &CommitResponse) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommitResponse
Auto Trait Implementations§
impl !Freeze for CommitResponse
impl RefUnwindSafe for CommitResponse
impl Send for CommitResponse
impl Sync for CommitResponse
impl Unpin for CommitResponse
impl UnsafeUnpin for CommitResponse
impl UnwindSafe for CommitResponse
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