pub struct RateLimitVariant {
pub vendor: Vendor,
pub duration: Option<Duration>,
pub limit_header: Option<String>,
pub used_header: Option<String>,
pub remaining_header: String,
pub reset_header: String,
pub reset_kind: ResetTimeKind,
}
Expand description
A variant defines all relevant fields for parsing headers from a given vendor
Fields§
§vendor: Vendor
Vendor of the rate limit headers (e.g. Github, Twitter, etc.)
duration: Option<Duration>
Duration of the rate limit interval
limit_header: Option<String>
Header name for the maximum number of requests
used_header: Option<String>
Header name for the number of used requests
remaining_header: String
Header name for the number of remaining requests
reset_header: String
Header name for the reset time
reset_kind: ResetTimeKind
Kind of reset time
Implementations§
Trait Implementations§
Source§impl Clone for RateLimitVariant
impl Clone for RateLimitVariant
Source§fn clone(&self) -> RateLimitVariant
fn clone(&self) -> RateLimitVariant
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RateLimitVariant
impl Debug for RateLimitVariant
Source§impl PartialEq for RateLimitVariant
impl PartialEq for RateLimitVariant
impl StructuralPartialEq for RateLimitVariant
Auto Trait Implementations§
impl Freeze for RateLimitVariant
impl RefUnwindSafe for RateLimitVariant
impl Send for RateLimitVariant
impl Sync for RateLimitVariant
impl Unpin for RateLimitVariant
impl UnwindSafe for RateLimitVariant
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