Enum rate_limits::ResetTime
source · [−]pub enum ResetTime {
Seconds(usize),
DateTime(OffsetDateTime),
}
Expand description
Reset time of rate limiting
There are different variants on how to specify reset times in rate limit headers. The most common ones are seconds and datetime.
Variants
Seconds(usize)
Number of seconds until rate limit is lifted
DateTime(OffsetDateTime)
Date when rate limit will be lifted
Implementations
sourceimpl ResetTime
impl ResetTime
pub fn new(value: &HeaderValue, kind: ResetTimeKind) -> Result<Self, Error>
Trait Implementations
impl Copy for ResetTime
impl StructuralPartialEq for ResetTime
Auto Trait Implementations
impl RefUnwindSafe for ResetTime
impl Send for ResetTime
impl Sync for ResetTime
impl Unpin for ResetTime
impl UnwindSafe for ResetTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more