#[non_exhaustive]pub struct ReplicaComputeCapacity {
pub replica_selection: Option<ReplicaSelection>,
pub compute_capacity: Option<ComputeCapacity>,
/* private fields */
}Expand description
ReplicaComputeCapacity describes the amount of server resources that are allocated to each replica identified by the replica selection.
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.replica_selection: Option<ReplicaSelection>Required. Identifies replicas by specified properties. All replicas in the selection have the same amount of compute capacity.
compute_capacity: Option<ComputeCapacity>Compute capacity allocated to each replica identified by the specified selection. The unit is selected based on the unit used to specify the instance size for non-autoscaling instances, or the unit used in autoscaling limit for autoscaling instances.
Implementations§
Source§impl ReplicaComputeCapacity
impl ReplicaComputeCapacity
Sourcepub fn set_replica_selection<T>(self, v: T) -> Selfwhere
T: Into<ReplicaSelection>,
pub fn set_replica_selection<T>(self, v: T) -> Selfwhere
T: Into<ReplicaSelection>,
Sets the value of replica_selection.
§Example
use google_cloud_spanner_admin_instance_v1::model::ReplicaSelection;
let x = ReplicaComputeCapacity::new().set_replica_selection(ReplicaSelection::default()/* use setters */);Sourcepub fn set_or_clear_replica_selection<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReplicaSelection>,
pub fn set_or_clear_replica_selection<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReplicaSelection>,
Sets or clears the value of replica_selection.
§Example
use google_cloud_spanner_admin_instance_v1::model::ReplicaSelection;
let x = ReplicaComputeCapacity::new().set_or_clear_replica_selection(Some(ReplicaSelection::default()/* use setters */));
let x = ReplicaComputeCapacity::new().set_or_clear_replica_selection(None::<ReplicaSelection>);Sourcepub fn set_compute_capacity<T: Into<Option<ComputeCapacity>>>(
self,
v: T,
) -> Self
pub fn set_compute_capacity<T: Into<Option<ComputeCapacity>>>( self, v: T, ) -> Self
Sets the value of compute_capacity.
Note that all the setters affecting compute_capacity are mutually
exclusive.
§Example
use google_cloud_spanner_admin_instance_v1::model::replica_compute_capacity::ComputeCapacity;
let x = ReplicaComputeCapacity::new().set_compute_capacity(Some(ComputeCapacity::NodeCount(42)));Sourcepub fn node_count(&self) -> Option<&i32>
pub fn node_count(&self) -> Option<&i32>
The value of compute_capacity
if it holds a NodeCount, None if the field is not set or
holds a different branch.
Sourcepub fn set_node_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_node_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of compute_capacity
to hold a NodeCount.
Note that all the setters affecting compute_capacity are
mutually exclusive.
§Example
let x = ReplicaComputeCapacity::new().set_node_count(42);
assert!(x.node_count().is_some());
assert!(x.processing_units().is_none());Sourcepub fn processing_units(&self) -> Option<&i32>
pub fn processing_units(&self) -> Option<&i32>
The value of compute_capacity
if it holds a ProcessingUnits, None if the field is not set or
holds a different branch.
Sourcepub fn set_processing_units<T: Into<i32>>(self, v: T) -> Self
pub fn set_processing_units<T: Into<i32>>(self, v: T) -> Self
Sets the value of compute_capacity
to hold a ProcessingUnits.
Note that all the setters affecting compute_capacity are
mutually exclusive.
§Example
let x = ReplicaComputeCapacity::new().set_processing_units(42);
assert!(x.processing_units().is_some());
assert!(x.node_count().is_none());Trait Implementations§
Source§impl Clone for ReplicaComputeCapacity
impl Clone for ReplicaComputeCapacity
Source§fn clone(&self) -> ReplicaComputeCapacity
fn clone(&self) -> ReplicaComputeCapacity
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 ReplicaComputeCapacity
impl Debug for ReplicaComputeCapacity
Source§impl Default for ReplicaComputeCapacity
impl Default for ReplicaComputeCapacity
Source§fn default() -> ReplicaComputeCapacity
fn default() -> ReplicaComputeCapacity
Source§impl Message for ReplicaComputeCapacity
impl Message for ReplicaComputeCapacity
Source§impl PartialEq for ReplicaComputeCapacity
impl PartialEq for ReplicaComputeCapacity
impl StructuralPartialEq for ReplicaComputeCapacity
Auto Trait Implementations§
impl Freeze for ReplicaComputeCapacity
impl RefUnwindSafe for ReplicaComputeCapacity
impl Send for ReplicaComputeCapacity
impl Sync for ReplicaComputeCapacity
impl Unpin for ReplicaComputeCapacity
impl UnsafeUnpin for ReplicaComputeCapacity
impl UnwindSafe for ReplicaComputeCapacity
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