#[non_exhaustive]pub enum RateLimitFields {
Draft7,
Draft11,
Disabled,
}Expand description
The Rate Limit Fields revision emitted in responses.
Draft 7 represents RateLimit as a dictionary containing limit, remaining, and reset.
Its RateLimit-Policy field contains the quota and window without a policy identifier.
Draft 11 represents both fields as lists of named items. This crate emits its fixed-window
q/w and r/t parameters; optional quota-unit (qu) and partition-key (pk) parameters
are not emitted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Draft7
Emit fields compatible with draft 7.
Draft11
Emit fields compatible with draft 11.
Disabled
Do not emit RateLimit or RateLimit-Policy fields.
Rate-limited responses still include Retry-After.
Trait Implementations§
Source§impl Clone for RateLimitFields
impl Clone for RateLimitFields
Source§fn clone(&self) -> RateLimitFields
fn clone(&self) -> RateLimitFields
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 moreimpl Copy for RateLimitFields
Source§impl Debug for RateLimitFields
impl Debug for RateLimitFields
Source§impl Default for RateLimitFields
impl Default for RateLimitFields
Source§fn default() -> RateLimitFields
fn default() -> RateLimitFields
Returns the “default value” for a type. Read more
impl Eq for RateLimitFields
Source§impl PartialEq for RateLimitFields
impl PartialEq for RateLimitFields
impl StructuralPartialEq for RateLimitFields
Auto Trait Implementations§
impl Freeze for RateLimitFields
impl RefUnwindSafe for RateLimitFields
impl Send for RateLimitFields
impl Sync for RateLimitFields
impl Unpin for RateLimitFields
impl UnsafeUnpin for RateLimitFields
impl UnwindSafe for RateLimitFields
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,
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.