#[non_exhaustive]pub struct ReadOnly {
pub return_read_timestamp: bool,
pub timestamp_bound: Option<TimestampBound>,
/* private fields */
}Expand description
Message type to initiate a read-only 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.return_read_timestamp: boolIf true, the Cloud Spanner-selected read timestamp is included in the Transaction message that describes the transaction.
timestamp_bound: Option<TimestampBound>How to choose the timestamp for the read-only transaction.
Implementations§
Source§impl ReadOnly
impl ReadOnly
Sourcepub fn set_return_read_timestamp<T: Into<bool>>(self, v: T) -> Self
pub fn set_return_read_timestamp<T: Into<bool>>(self, v: T) -> Self
Sets the value of return_read_timestamp.
Sourcepub fn set_timestamp_bound<T: Into<Option<TimestampBound>>>(self, v: T) -> Self
pub fn set_timestamp_bound<T: Into<Option<TimestampBound>>>(self, v: T) -> Self
Sets the value of timestamp_bound.
Note that all the setters affecting timestamp_bound are mutually
exclusive.
Sourcepub fn strong(&self) -> Option<&bool>
pub fn strong(&self) -> Option<&bool>
The value of timestamp_bound
if it holds a Strong, None if the field is not set or
holds a different branch.
Sourcepub fn set_strong<T: Into<bool>>(self, v: T) -> Self
pub fn set_strong<T: Into<bool>>(self, v: T) -> Self
Sets the value of timestamp_bound
to hold a Strong.
Note that all the setters affecting timestamp_bound are
mutually exclusive.
Sourcepub fn min_read_timestamp(&self) -> Option<&Box<Timestamp>>
pub fn min_read_timestamp(&self) -> Option<&Box<Timestamp>>
The value of timestamp_bound
if it holds a MinReadTimestamp, None if the field is not set or
holds a different branch.
Sourcepub fn set_min_read_timestamp<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_min_read_timestamp<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of timestamp_bound
to hold a MinReadTimestamp.
Note that all the setters affecting timestamp_bound are
mutually exclusive.
Sourcepub fn max_staleness(&self) -> Option<&Box<Duration>>
pub fn max_staleness(&self) -> Option<&Box<Duration>>
The value of timestamp_bound
if it holds a MaxStaleness, None if the field is not set or
holds a different branch.
Sourcepub fn set_max_staleness<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_max_staleness<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of timestamp_bound
to hold a MaxStaleness.
Note that all the setters affecting timestamp_bound are
mutually exclusive.
Sourcepub fn read_timestamp(&self) -> Option<&Box<Timestamp>>
pub fn read_timestamp(&self) -> Option<&Box<Timestamp>>
The value of timestamp_bound
if it holds a ReadTimestamp, None if the field is not set or
holds a different branch.
Sourcepub fn set_read_timestamp<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_read_timestamp<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of timestamp_bound
to hold a ReadTimestamp.
Note that all the setters affecting timestamp_bound are
mutually exclusive.
Sourcepub fn exact_staleness(&self) -> Option<&Box<Duration>>
pub fn exact_staleness(&self) -> Option<&Box<Duration>>
The value of timestamp_bound
if it holds a ExactStaleness, None if the field is not set or
holds a different branch.
Sourcepub fn set_exact_staleness<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_exact_staleness<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of timestamp_bound
to hold a ExactStaleness.
Note that all the setters affecting timestamp_bound are
mutually exclusive.
Trait Implementations§
impl StructuralPartialEq for ReadOnly
Auto Trait Implementations§
impl Freeze for ReadOnly
impl RefUnwindSafe for ReadOnly
impl Send for ReadOnly
impl Sync for ReadOnly
impl Unpin for ReadOnly
impl UnsafeUnpin for ReadOnly
impl UnwindSafe for ReadOnly
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