pub struct RateLimit {
pub reset: ResetTime,
}Expand description
HTTP rate limits as parsed from header values
Fields§
§reset: ResetTimeTime at which the rate limit will be reset
Implementations§
Source§impl RateLimit
impl RateLimit
Sourcepub fn new(headers: &HeaderMap) -> Result<Self, Error>
pub fn new(headers: &HeaderMap) -> Result<Self, Error>
Rate limit implementation based on Retry-After header value
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
Trait Implementations§
impl Copy for RateLimit
impl StructuralPartialEq for RateLimit
Auto Trait Implementations§
impl Freeze for RateLimit
impl RefUnwindSafe for RateLimit
impl Send for RateLimit
impl Sync for RateLimit
impl Unpin for RateLimit
impl UnsafeUnpin for RateLimit
impl UnwindSafe for RateLimit
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