#[non_exhaustive]pub struct DirectedReadOptions {
pub replicas: Option<Replicas>,
/* private fields */
}Expand description
The DirectedReadOptions can be used to indicate which replicas or regions
should be used for non-transactional reads or queries.
DirectedReadOptions can only be specified for a read-only transaction,
otherwise the API returns an INVALID_ARGUMENT error.
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.replicas: Option<Replicas>Required. At most one of either include_replicas or exclude_replicas
should be present in the message.
Implementations§
Source§impl DirectedReadOptions
impl DirectedReadOptions
Sourcepub fn set_replicas<T: Into<Option<Replicas>>>(self, v: T) -> Self
pub fn set_replicas<T: Into<Option<Replicas>>>(self, v: T) -> Self
Sets the value of replicas.
Note that all the setters affecting replicas are mutually
exclusive.
Sourcepub fn include_replicas(&self) -> Option<&Box<IncludeReplicas>>
pub fn include_replicas(&self) -> Option<&Box<IncludeReplicas>>
The value of replicas
if it holds a IncludeReplicas, None if the field is not set or
holds a different branch.
Sourcepub fn set_include_replicas<T: Into<Box<IncludeReplicas>>>(self, v: T) -> Self
pub fn set_include_replicas<T: Into<Box<IncludeReplicas>>>(self, v: T) -> Self
Sets the value of replicas
to hold a IncludeReplicas.
Note that all the setters affecting replicas are
mutually exclusive.
Sourcepub fn exclude_replicas(&self) -> Option<&Box<ExcludeReplicas>>
pub fn exclude_replicas(&self) -> Option<&Box<ExcludeReplicas>>
The value of replicas
if it holds a ExcludeReplicas, None if the field is not set or
holds a different branch.
Sourcepub fn set_exclude_replicas<T: Into<Box<ExcludeReplicas>>>(self, v: T) -> Self
pub fn set_exclude_replicas<T: Into<Box<ExcludeReplicas>>>(self, v: T) -> Self
Sets the value of replicas
to hold a ExcludeReplicas.
Note that all the setters affecting replicas are
mutually exclusive.
Trait Implementations§
Source§impl Clone for DirectedReadOptions
impl Clone for DirectedReadOptions
Source§fn clone(&self) -> DirectedReadOptions
fn clone(&self) -> DirectedReadOptions
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 DirectedReadOptions
impl Debug for DirectedReadOptions
Source§impl Default for DirectedReadOptions
impl Default for DirectedReadOptions
Source§fn default() -> DirectedReadOptions
fn default() -> DirectedReadOptions
Source§impl Message for DirectedReadOptions
impl Message for DirectedReadOptions
Source§impl PartialEq for DirectedReadOptions
impl PartialEq for DirectedReadOptions
Source§fn eq(&self, other: &DirectedReadOptions) -> bool
fn eq(&self, other: &DirectedReadOptions) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DirectedReadOptions
Auto Trait Implementations§
impl Freeze for DirectedReadOptions
impl RefUnwindSafe for DirectedReadOptions
impl Send for DirectedReadOptions
impl Sync for DirectedReadOptions
impl Unpin for DirectedReadOptions
impl UnsafeUnpin for DirectedReadOptions
impl UnwindSafe for DirectedReadOptions
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