#[non_exhaustive]pub enum QuotaReductionPolicy {
Reject,
GrandfatherExisting,
ThrottleProportional,
}Expand description
What to do when a parent’s quota reduction would drop below the
aggregate usage of its children. Default: Reject.
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.
Reject
Reject the reduction request if new_quota < sum(child_usage).
GrandfatherExisting
Existing usage retained as-is; the new quota applies only to future allocations.
ThrottleProportional
Existing usage proportionally scaled down; deterministic
round-robin over BTreeMap<InstanceId, _> ascending order
distributes any remainder bytes.
Trait Implementations§
Source§impl Clone for QuotaReductionPolicy
impl Clone for QuotaReductionPolicy
Source§fn clone(&self) -> QuotaReductionPolicy
fn clone(&self) -> QuotaReductionPolicy
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 QuotaReductionPolicy
impl Debug for QuotaReductionPolicy
Source§impl Default for QuotaReductionPolicy
impl Default for QuotaReductionPolicy
Source§fn default() -> QuotaReductionPolicy
fn default() -> QuotaReductionPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for QuotaReductionPolicy
impl<'de> Deserialize<'de> for QuotaReductionPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for QuotaReductionPolicy
impl PartialEq for QuotaReductionPolicy
Source§impl Serialize for QuotaReductionPolicy
impl Serialize for QuotaReductionPolicy
impl Copy for QuotaReductionPolicy
impl Eq for QuotaReductionPolicy
impl StructuralPartialEq for QuotaReductionPolicy
Auto Trait Implementations§
impl Freeze for QuotaReductionPolicy
impl RefUnwindSafe for QuotaReductionPolicy
impl Send for QuotaReductionPolicy
impl Sync for QuotaReductionPolicy
impl Unpin for QuotaReductionPolicy
impl UnsafeUnpin for QuotaReductionPolicy
impl UnwindSafe for QuotaReductionPolicy
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