pub struct RateLimitingObservation {
pub scope: RateLimitingObservationScope,
pub type_: RateLimitingObservationType,
pub usage: RateLimitUsage,
}Expand description
The rate-limit usage a rateLimiting criterion compared, read without being consumed. The criterion is met when the projected usage stays within the limit and unmet when it exceeds the limit. Totals can change before a real call.
JSON schema
{
"title": "RateLimitingObservation",
"description": "The rate-limit usage a `rateLimiting` criterion compared, read without being consumed. The criterion is met when the projected usage stays within the limit and unmet when it exceeds the limit. Totals can change before a real call.",
"examples": [
{
"scope": "project",
"type": "rateLimiting",
"usage": {
"pendingCount": 0,
"type": "count",
"windowCount": 10
}
}
],
"type": "object",
"required": [
"scope",
"type",
"usage"
],
"properties": {
"scope": {
"description": "Whose operations the counter totals. `project` counts operations of every account in the project, not only the account in the request. `end_user` counts operations of the end user in the request.",
"examples": [
"project"
],
"type": "string",
"enum": [
"project",
"end_user"
],
"x-go-type": "string"
},
"type": {
"description": "The criterion type.",
"examples": [
"rateLimiting"
],
"type": "string",
"enum": [
"rateLimiting"
],
"x-go-type": "string"
},
"usage": {
"$ref": "#/components/schemas/RateLimitUsage"
}
},
"additionalProperties": false
}Fields§
§scope: RateLimitingObservationScopeWhose operations the counter totals. project counts operations of every account in the project, not only the account in the request. end_user counts operations of the end user in the request.
type_: RateLimitingObservationTypeThe criterion type.
usage: RateLimitUsageImplementations§
Source§impl RateLimitingObservation
impl RateLimitingObservation
pub fn builder() -> RateLimitingObservation
Trait Implementations§
Source§impl Clone for RateLimitingObservation
impl Clone for RateLimitingObservation
Source§impl Debug for RateLimitingObservation
impl Debug for RateLimitingObservation
Source§impl<'de> Deserialize<'de> for RateLimitingObservation
impl<'de> Deserialize<'de> for RateLimitingObservation
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<&RateLimitingObservation> for RateLimitingObservation
impl From<&RateLimitingObservation> for RateLimitingObservation
Source§fn from(value: &RateLimitingObservation) -> Self
fn from(value: &RateLimitingObservation) -> Self
Converts to this type from the input type.
Source§impl From<RateLimitingObservation> for PolicyCriterionObservation
impl From<RateLimitingObservation> for PolicyCriterionObservation
Source§fn from(value: RateLimitingObservation) -> Self
fn from(value: RateLimitingObservation) -> Self
Converts to this type from the input type.
Source§impl From<RateLimitingObservation> for RateLimitingObservation
impl From<RateLimitingObservation> for RateLimitingObservation
Source§fn from(value: RateLimitingObservation) -> Self
fn from(value: RateLimitingObservation) -> Self
Converts to this type from the input type.
Source§impl Serialize for RateLimitingObservation
impl Serialize for RateLimitingObservation
Source§impl TryFrom<RateLimitingObservation> for RateLimitingObservation
impl TryFrom<RateLimitingObservation> for RateLimitingObservation
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: RateLimitingObservation) -> Result<Self, ConversionError>
fn try_from(value: RateLimitingObservation) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for RateLimitingObservation
impl RefUnwindSafe for RateLimitingObservation
impl Send for RateLimitingObservation
impl Sync for RateLimitingObservation
impl Unpin for RateLimitingObservation
impl UnsafeUnpin for RateLimitingObservation
impl UnwindSafe for RateLimitingObservation
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