pub struct RateLimitHeaders {
pub limit: Option<u64>,
pub remaining: Option<u64>,
pub reset: Option<u64>,
pub quota_used: Option<u64>,
pub quota_limit: Option<u64>,
}Expand description
Rate-limit and quota headers present on every API response (OPS-1).
Fields are None when the server does not include the header (e.g.
non-namespaced endpoints where quota does not apply).
Fields§
§limit: Option<u64>X-RateLimit-Limit — max requests allowed in the current window.
remaining: Option<u64>X-RateLimit-Remaining — requests left in the current window.
reset: Option<u64>X-RateLimit-Reset — Unix timestamp (seconds) when the window resets.
quota_used: Option<u64>X-Quota-Used — namespace vectors / storage consumed.
quota_limit: Option<u64>X-Quota-Limit — namespace quota ceiling.
Implementations§
Source§impl RateLimitHeaders
impl RateLimitHeaders
Sourcepub fn from_response(response: &Response) -> Self
pub fn from_response(response: &Response) -> Self
Parse rate-limit headers from a reqwest::Response.
Trait Implementations§
Source§impl Clone for RateLimitHeaders
impl Clone for RateLimitHeaders
Source§fn clone(&self) -> RateLimitHeaders
fn clone(&self) -> RateLimitHeaders
Returns a duplicate of the value. Read more
1.0.0 · 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 RateLimitHeaders
impl Debug for RateLimitHeaders
Source§impl Default for RateLimitHeaders
impl Default for RateLimitHeaders
Source§fn default() -> RateLimitHeaders
fn default() -> RateLimitHeaders
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RateLimitHeaders
impl RefUnwindSafe for RateLimitHeaders
impl Send for RateLimitHeaders
impl Sync for RateLimitHeaders
impl Unpin for RateLimitHeaders
impl UnsafeUnpin for RateLimitHeaders
impl UnwindSafe for RateLimitHeaders
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