#[non_exhaustive]pub struct TargetMetric {
pub metric: Option<String>,
pub target_value: Option<f32>,
/* private fields */
}Expand description
Target metric for read pool auto scaling.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.metric: Option<String>The metric name to be used for auto scaling.
target_value: Option<f32>The target value for the metric.
Implementations§
Source§impl TargetMetric
impl TargetMetric
pub fn new() -> Self
Sourcepub fn set_metric<T>(self, v: T) -> Self
pub fn set_metric<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_metric<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metric<T>(self, v: Option<T>) -> Self
Sourcepub fn set_target_value<T>(self, v: T) -> Self
pub fn set_target_value<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_target_value<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_target_value<T>(self, v: Option<T>) -> Self
Sets or clears the value of target_value.
§Example
ⓘ
let x = TargetMetric::new().set_or_clear_target_value(Some(42.0));
let x = TargetMetric::new().set_or_clear_target_value(None::<f32>);Trait Implementations§
Source§impl Clone for TargetMetric
impl Clone for TargetMetric
Source§fn clone(&self) -> TargetMetric
fn clone(&self) -> TargetMetric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TargetMetric
impl Debug for TargetMetric
Source§impl Default for TargetMetric
impl Default for TargetMetric
Source§fn default() -> TargetMetric
fn default() -> TargetMetric
Returns the “default value” for a type. Read more
Source§impl Message for TargetMetric
impl Message for TargetMetric
Source§impl PartialEq for TargetMetric
impl PartialEq for TargetMetric
impl StructuralPartialEq for TargetMetric
Auto Trait Implementations§
impl Freeze for TargetMetric
impl RefUnwindSafe for TargetMetric
impl Send for TargetMetric
impl Sync for TargetMetric
impl Unpin for TargetMetric
impl UnwindSafe for TargetMetric
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
Mutably borrows from an owned value. Read more