#[non_exhaustive]pub struct CpuUtilization {
pub aggregation_window_length: Option<Duration>,
pub target_utilization: f64,
/* private fields */
}Expand description
Target scaling by CPU usage.
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.aggregation_window_length: Option<Duration>Period of time over which CPU utilization is calculated.
target_utilization: f64Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.
Implementations§
Source§impl CpuUtilization
impl CpuUtilization
pub fn new() -> Self
Sourcepub fn set_aggregation_window_length<T>(self, v: T) -> Self
pub fn set_aggregation_window_length<T>(self, v: T) -> Self
Sets the value of aggregation_window_length.
Sourcepub fn set_or_clear_aggregation_window_length<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_aggregation_window_length<T>(self, v: Option<T>) -> Self
Sets or clears the value of aggregation_window_length.
Sourcepub fn set_target_utilization<T: Into<f64>>(self, v: T) -> Self
pub fn set_target_utilization<T: Into<f64>>(self, v: T) -> Self
Sets the value of target_utilization.
Trait Implementations§
Source§impl Clone for CpuUtilization
impl Clone for CpuUtilization
Source§fn clone(&self) -> CpuUtilization
fn clone(&self) -> CpuUtilization
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 CpuUtilization
impl Debug for CpuUtilization
Source§impl Default for CpuUtilization
impl Default for CpuUtilization
Source§fn default() -> CpuUtilization
fn default() -> CpuUtilization
Returns the “default value” for a type. Read more
Source§impl Message for CpuUtilization
impl Message for CpuUtilization
Source§impl PartialEq for CpuUtilization
impl PartialEq for CpuUtilization
impl StructuralPartialEq for CpuUtilization
Auto Trait Implementations§
impl Freeze for CpuUtilization
impl RefUnwindSafe for CpuUtilization
impl Send for CpuUtilization
impl Sync for CpuUtilization
impl Unpin for CpuUtilization
impl UnwindSafe for CpuUtilization
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