pub struct FunctionQuota {
pub max_invocations: Option<u64>,
pub window_secs: Option<u64>,
pub max_concurrent: Option<u32>,
}Expand description
Per-function usage quota (FA-4) — require-style knobs enforced host-side,
fail-closed (over the limit ⇒ 429). Accounting, not billing: this bounds
abuse, it does not charge. All limits are per node today (a cluster-wide token
bucket is future work); None on a field means that dimension is unlimited.
Fields§
§max_invocations: Option<u64>Max invocations admitted within window_secs (a
fixed window: the counter resets when the window rolls over).
window_secs: Option<u64>The rate-limit window length in seconds (defaults to 60 when a
max_invocations cap is set).
max_concurrent: Option<u32>Max concurrent in-flight invocations for this function (per node).
Implementations§
Trait Implementations§
Source§impl Clone for FunctionQuota
impl Clone for FunctionQuota
Source§fn clone(&self) -> FunctionQuota
fn clone(&self) -> FunctionQuota
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 FunctionQuota
impl Debug for FunctionQuota
Source§impl Default for FunctionQuota
impl Default for FunctionQuota
Source§fn default() -> FunctionQuota
fn default() -> FunctionQuota
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FunctionQuotawhere
FunctionQuota: Default,
impl<'de> Deserialize<'de> for FunctionQuotawhere
FunctionQuota: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FunctionQuota, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FunctionQuota, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FunctionQuota
Source§impl PartialEq for FunctionQuota
impl PartialEq for FunctionQuota
Source§impl Serialize for FunctionQuota
impl Serialize for FunctionQuota
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 FunctionQuota
Auto Trait Implementations§
impl Freeze for FunctionQuota
impl RefUnwindSafe for FunctionQuota
impl Send for FunctionQuota
impl Sync for FunctionQuota
impl Unpin for FunctionQuota
impl UnsafeUnpin for FunctionQuota
impl UnwindSafe for FunctionQuota
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.