pub struct TierDecision { /* private fields */ }Expand description
The outcome of one tiered rate-limit check
(RateLimiter::check_tiers).
Implementations§
Source§impl TierDecision
impl TierDecision
Sourcepub const fn count(&self) -> u64
pub const fn count(&self) -> u64
The observed count of the decisive tier (including this request).
Sourcepub const fn tier(&self) -> RateLimitTier
pub const fn tier(&self) -> RateLimitTier
The tier the decision was made under.
Sourcepub const fn tier_name(&self) -> &'static str
pub const fn tier_name(&self) -> &'static str
The tier’s name ("endpoint", "route", "geo", "global").
Sourcepub const fn retry_after(&self) -> u64
pub const fn retry_after(&self) -> u64
The Retry-After header value for a blocked request: the blocking
tier’s window length, exactly what the reference sets.
Trait Implementations§
Source§impl Clone for TierDecision
impl Clone for TierDecision
impl Copy for TierDecision
Source§impl Debug for TierDecision
impl Debug for TierDecision
impl Eq for TierDecision
Source§impl PartialEq for TierDecision
impl PartialEq for TierDecision
impl StructuralPartialEq for TierDecision
Auto Trait Implementations§
impl Freeze for TierDecision
impl RefUnwindSafe for TierDecision
impl Send for TierDecision
impl Sync for TierDecision
impl Unpin for TierDecision
impl UnsafeUnpin for TierDecision
impl UnwindSafe for TierDecision
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
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.