pub enum ScalingPolicy {
Fixed,
Step {
scale_up_threshold: f64,
scale_down_threshold: f64,
step_size: u64,
min_capacity: u64,
max_capacity: u64,
},
TargetTracking {
target_utilisation: f64,
min_capacity: u64,
max_capacity: u64,
},
}Expand description
Scaling policy for a resource.
Variants§
Fixed
Fixed capacity — no scaling.
Step
Step scaling: increase by step_size when utilisation exceeds
scale_up_threshold, decrease when below scale_down_threshold.
Fields
TargetTracking
Target tracking: adjust capacity to maintain a target utilisation.
Trait Implementations§
Source§impl Clone for ScalingPolicy
impl Clone for ScalingPolicy
Source§fn clone(&self) -> ScalingPolicy
fn clone(&self) -> ScalingPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScalingPolicy
impl RefUnwindSafe for ScalingPolicy
impl Send for ScalingPolicy
impl Sync for ScalingPolicy
impl Unpin for ScalingPolicy
impl UnsafeUnpin for ScalingPolicy
impl UnwindSafe for ScalingPolicy
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