#[non_exhaustive]pub struct TransactionSelector {
pub selector: Option<Selector>,
/* private fields */
}Expand description
This message is used to select the transaction in which a Read or ExecuteSql call runs.
See TransactionOptions for more information about 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.selector: Option<Selector>If no fields are set, the default is a single use transaction with strong concurrency.
Implementations§
Source§impl TransactionSelector
impl TransactionSelector
Sourcepub fn set_selector<T: Into<Option<Selector>>>(self, v: T) -> Self
pub fn set_selector<T: Into<Option<Selector>>>(self, v: T) -> Self
Sets the value of selector.
Note that all the setters affecting selector are mutually
exclusive.
Sourcepub fn single_use(&self) -> Option<&Box<TransactionOptions>>
pub fn single_use(&self) -> Option<&Box<TransactionOptions>>
The value of selector
if it holds a SingleUse, None if the field is not set or
holds a different branch.
Sourcepub fn set_single_use<T: Into<Box<TransactionOptions>>>(self, v: T) -> Self
pub fn set_single_use<T: Into<Box<TransactionOptions>>>(self, v: T) -> Self
Sets the value of selector
to hold a SingleUse.
Note that all the setters affecting selector are
mutually exclusive.
Sourcepub fn id(&self) -> Option<&Bytes>
pub fn id(&self) -> Option<&Bytes>
The value of selector
if it holds a Id, None if the field is not set or
holds a different branch.
Sourcepub fn set_id<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_id<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of selector
to hold a Id.
Note that all the setters affecting selector are
mutually exclusive.
Trait Implementations§
Source§impl Clone for TransactionSelector
impl Clone for TransactionSelector
Source§fn clone(&self) -> TransactionSelector
fn clone(&self) -> TransactionSelector
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 TransactionSelector
impl Debug for TransactionSelector
Source§impl Default for TransactionSelector
impl Default for TransactionSelector
Source§fn default() -> TransactionSelector
fn default() -> TransactionSelector
Source§impl Message for TransactionSelector
impl Message for TransactionSelector
Source§impl PartialEq for TransactionSelector
impl PartialEq for TransactionSelector
Source§fn eq(&self, other: &TransactionSelector) -> bool
fn eq(&self, other: &TransactionSelector) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TransactionSelector
Auto Trait Implementations§
impl !Freeze for TransactionSelector
impl RefUnwindSafe for TransactionSelector
impl Send for TransactionSelector
impl Sync for TransactionSelector
impl Unpin for TransactionSelector
impl UnsafeUnpin for TransactionSelector
impl UnwindSafe for TransactionSelector
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