pub struct RateLimitInfo {
pub remaining: Option<i64>,
pub limit: Option<i64>,
pub reset_in: Option<i64>,
pub retry_after: Option<i64>,
pub limit_type: Option<String>,
}Expand description
A snapshot of the rate-limit headers from the most recent response.
Returned by Client::rate_limit_info.
Any field set to None was either absent from the response or could not
be parsed as an integer.
Fields§
§remaining: Option<i64>X-RateLimit-Remaining — calls remaining in the current bucket.
limit: Option<i64>X-RateLimit-Limit — the maximum calls in the current bucket.
reset_in: Option<i64>X-RateLimit-Reset — seconds until the bucket refills.
retry_after: Option<i64>Retry-After — server-suggested wait before retrying, in seconds.
limit_type: Option<String>X-RateLimit-Type — bucket discriminator (e.g. "minute", "hour").
Trait Implementations§
Source§impl Clone for RateLimitInfo
impl Clone for RateLimitInfo
Source§fn clone(&self) -> RateLimitInfo
fn clone(&self) -> RateLimitInfo
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 moreSource§impl Debug for RateLimitInfo
impl Debug for RateLimitInfo
Source§impl Default for RateLimitInfo
impl Default for RateLimitInfo
Source§fn default() -> RateLimitInfo
fn default() -> RateLimitInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for RateLimitInfo
impl PartialEq for RateLimitInfo
Source§fn eq(&self, other: &RateLimitInfo) -> bool
fn eq(&self, other: &RateLimitInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RateLimitInfo
impl StructuralPartialEq for RateLimitInfo
Auto Trait Implementations§
impl Freeze for RateLimitInfo
impl RefUnwindSafe for RateLimitInfo
impl Send for RateLimitInfo
impl Sync for RateLimitInfo
impl Unpin for RateLimitInfo
impl UnsafeUnpin for RateLimitInfo
impl UnwindSafe for RateLimitInfo
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