pub struct RateLimitInfo {
pub limit: AtomicU32,
pub remaining: AtomicU32,
pub reset_seconds: AtomicU32,
}Expand description
Rate limit state from API response headers.
Uses atomics so it can be updated from &self.
Fields§
§limit: AtomicU32Maximum requests allowed per minute.
remaining: AtomicU32Requests remaining in the current window.
reset_seconds: AtomicU32Seconds until the rate limit window resets.
Implementations§
Trait Implementations§
Source§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
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