pub struct RateLimitStatus {
pub group: String,
pub limit: String,
pub max_tokens: Option<u64>,
pub window_secs: Option<u64>,
pub remaining: i64,
pub used: i64,
pub updated_at_millis: i64,
}Expand description
Latest rate-limit state ESI reported for one route group.
ESI uses a floating-window token bucket per application/character pair and route group; see the ESI rate limiting docs. The values are those of the most recent response for the group.
Fields§
§group: StringRoute group, from X-Ratelimit-Group.
limit: StringRaw X-Ratelimit-Limit value, e.g. 150/15m.
max_tokens: Option<u64>Tokens per window, parsed from limit (e.g. 150).
window_secs: Option<u64>Window length in seconds, parsed from limit (e.g. 900 for 15m).
remaining: i64Tokens left in the window, from X-Ratelimit-Remaining.
used: i64Tokens consumed by the request that returned these headers,
from X-Ratelimit-Used.
updated_at_millis: i64Millisecond unix timestamp of the response these values came from.
Trait Implementations§
Source§impl Clone for RateLimitStatus
impl Clone for RateLimitStatus
Source§impl Debug for RateLimitStatus
impl Debug for RateLimitStatus
impl Eq for RateLimitStatus
Source§impl PartialEq for RateLimitStatus
impl PartialEq for RateLimitStatus
impl StructuralPartialEq for RateLimitStatus
Auto Trait Implementations§
impl Freeze for RateLimitStatus
impl RefUnwindSafe for RateLimitStatus
impl Send for RateLimitStatus
impl Sync for RateLimitStatus
impl Unpin for RateLimitStatus
impl UnsafeUnpin for RateLimitStatus
impl UnwindSafe for RateLimitStatus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.