#[non_exhaustive]pub enum Scaling {
AutomaticScaling(Box<AutomaticScaling>),
BasicScaling(Box<BasicScaling>),
ManualScaling(Box<ManualScaling>),
}Expand description
Controls how instances are created, scaled, and reaped.
Defaults to AutomaticScaling.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AutomaticScaling(Box<AutomaticScaling>)
Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.
BasicScaling(Box<BasicScaling>)
A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
ManualScaling(Box<ManualScaling>)
A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as “backends”.
Trait Implementations§
impl StructuralPartialEq for Scaling
Auto Trait Implementations§
impl Freeze for Scaling
impl RefUnwindSafe for Scaling
impl Send for Scaling
impl Sync for Scaling
impl Unpin for Scaling
impl UnwindSafe for Scaling
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