pub enum RateLimitUsage {
CountUsage(RateLimitCountUsage),
ValueUsage(RateLimitValueUsage),
}Expand description
The usage totals the criterion compared, discriminated by type: count when the criterion sets maxCount, value when it sets maxValueCents.
JSON schema
{
"description": "The usage totals the criterion compared, discriminated by `type`: `count` when the criterion sets `maxCount`, `value` when it sets `maxValueCents`.",
"examples": [
{
"pendingCount": 0,
"type": "count",
"windowCount": 10
}
],
"oneOf": [
{
"$ref": "#/components/schemas/RateLimitCountUsage"
},
{
"$ref": "#/components/schemas/RateLimitValueUsage"
}
]
}Variants§
CountUsage(RateLimitCountUsage)
ValueUsage(RateLimitValueUsage)
Trait Implementations§
Source§impl Clone for RateLimitUsage
impl Clone for RateLimitUsage
Source§impl Debug for RateLimitUsage
impl Debug for RateLimitUsage
Source§impl<'de> Deserialize<'de> for RateLimitUsage
impl<'de> Deserialize<'de> for RateLimitUsage
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<&RateLimitUsage> for RateLimitUsage
impl From<&RateLimitUsage> for RateLimitUsage
Source§fn from(value: &RateLimitUsage) -> Self
fn from(value: &RateLimitUsage) -> 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<RateLimitValueUsage> for RateLimitUsage
impl From<RateLimitValueUsage> for RateLimitUsage
Source§fn from(value: RateLimitValueUsage) -> Self
fn from(value: RateLimitValueUsage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RateLimitUsage
impl RefUnwindSafe for RateLimitUsage
impl Send for RateLimitUsage
impl Sync for RateLimitUsage
impl Unpin for RateLimitUsage
impl UnsafeUnpin for RateLimitUsage
impl UnwindSafe for RateLimitUsage
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