pub struct ScalePolicy {
pub policy_type: PolicyType,
pub value: u32,
pub period: Option<Duration>,
}Expand description
A single rate-limit policy: at most value Pods/Percent per period.
Fields§
§policy_type: PolicyTypeWhether value is an absolute pod count or a percentage of current.
value: u32The allowed change magnitude.
period: Option<Duration>The period the value applies over.
Trait Implementations§
Source§impl Clone for ScalePolicy
impl Clone for ScalePolicy
Source§fn clone(&self) -> ScalePolicy
fn clone(&self) -> ScalePolicy
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 moreSource§impl Debug for ScalePolicy
impl Debug for ScalePolicy
Source§impl<'de> Deserialize<'de> for ScalePolicy
impl<'de> Deserialize<'de> for ScalePolicy
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScalePolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScalePolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ScalePolicy
Source§impl PartialEq for ScalePolicy
impl PartialEq for ScalePolicy
Source§fn eq(&self, other: &ScalePolicy) -> bool
fn eq(&self, other: &ScalePolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScalePolicy
impl Serialize for ScalePolicy
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ScalePolicy
Auto Trait Implementations§
impl Freeze for ScalePolicy
impl RefUnwindSafe for ScalePolicy
impl Send for ScalePolicy
impl Sync for ScalePolicy
impl Unpin for ScalePolicy
impl UnsafeUnpin for ScalePolicy
impl UnwindSafe for ScalePolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.