pub struct RateLimitCountUsage {
pub pending_count: u64,
pub type_: RateLimitCountUsageType,
pub window_count: u64,
}Expand description
Operation counts for a maxCount criterion. The criterion is met when windowCount + pendingCount + 1 <= maxCount and unmet when the sum exceeds maxCount, where 1 is this operation.
JSON schema
{
"title": "RateLimitCountUsage",
"description": "Operation counts for a `maxCount` criterion. The criterion is met when `windowCount + pendingCount + 1 <= maxCount` and unmet when the sum exceeds `maxCount`, where `1` is this operation.",
"examples": [
{
"pendingCount": 0,
"type": "count",
"windowCount": 10
}
],
"type": "object",
"required": [
"pendingCount",
"type",
"windowCount"
],
"properties": {
"pendingCount": {
"description": "Operations added by earlier units of this simulation request. They are not persisted. Always `0` when `evaluatedUnit` is absent.",
"examples": [
0
],
"type": "integer",
"minimum": 0.0
},
"type": {
"description": "The usage type.",
"examples": [
"count"
],
"type": "string",
"enum": [
"count"
],
"x-go-type": "string"
},
"windowCount": {
"description": "Operations counted in the current `window`.",
"examples": [
10
],
"type": "integer",
"minimum": 0.0
}
},
"additionalProperties": false
}Fields§
§pending_count: u64Operations added by earlier units of this simulation request. They are not persisted. Always 0 when evaluatedUnit is absent.
type_: RateLimitCountUsageTypeThe usage type.
window_count: u64Operations counted in the current window.
Implementations§
Source§impl RateLimitCountUsage
impl RateLimitCountUsage
pub fn builder() -> RateLimitCountUsage
Trait Implementations§
Source§impl Clone for RateLimitCountUsage
impl Clone for RateLimitCountUsage
Source§impl Debug for RateLimitCountUsage
impl Debug for RateLimitCountUsage
Source§impl<'de> Deserialize<'de> for RateLimitCountUsage
impl<'de> Deserialize<'de> for RateLimitCountUsage
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 From<&RateLimitCountUsage> for RateLimitCountUsage
impl From<&RateLimitCountUsage> for RateLimitCountUsage
Source§fn from(value: &RateLimitCountUsage) -> Self
fn from(value: &RateLimitCountUsage) -> Self
Converts to this type from the input type.
Source§impl From<RateLimitCountUsage> for RateLimitUsage
impl From<RateLimitCountUsage> for RateLimitUsage
Source§fn from(value: RateLimitCountUsage) -> Self
fn from(value: RateLimitCountUsage) -> Self
Converts to this type from the input type.
Source§impl From<RateLimitCountUsage> for RateLimitCountUsage
impl From<RateLimitCountUsage> for RateLimitCountUsage
Source§fn from(value: RateLimitCountUsage) -> Self
fn from(value: RateLimitCountUsage) -> Self
Converts to this type from the input type.
Source§impl Serialize for RateLimitCountUsage
impl Serialize for RateLimitCountUsage
Source§impl TryFrom<RateLimitCountUsage> for RateLimitCountUsage
impl TryFrom<RateLimitCountUsage> for RateLimitCountUsage
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: RateLimitCountUsage) -> Result<Self, ConversionError>
fn try_from(value: RateLimitCountUsage) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for RateLimitCountUsage
impl RefUnwindSafe for RateLimitCountUsage
impl Send for RateLimitCountUsage
impl Sync for RateLimitCountUsage
impl Unpin for RateLimitCountUsage
impl UnsafeUnpin for RateLimitCountUsage
impl UnwindSafe for RateLimitCountUsage
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