pub enum RateLimitRevocation {
Revokes,
Throttles,
}Expand description
Whether a confirmed rate limit (a 401/403 with exhausted X-RateLimit-Remaining) on a
credentialed revalidation means the credential may be revoked.
A per-source decision made by the caller that owns the credential, not a side effect of the transport tier.
§Examples
use deps_core::cache::RateLimitRevocation;
assert_eq!(RateLimitRevocation::default(), RateLimitRevocation::Revokes);Variants§
Revokes
Treat it like any other 401/403: evict the entry instead of serving it stale (#1295).
Throttles
Treat it as throttling only: the credential is fine, so the entry is served stale. For
sources whose rate limiter answers 403 (GitHub).
Trait Implementations§
Source§impl Clone for RateLimitRevocation
impl Clone for RateLimitRevocation
impl Copy for RateLimitRevocation
Source§impl Debug for RateLimitRevocation
impl Debug for RateLimitRevocation
Source§impl Default for RateLimitRevocation
impl Default for RateLimitRevocation
impl Eq for RateLimitRevocation
Source§impl PartialEq for RateLimitRevocation
impl PartialEq for RateLimitRevocation
impl StructuralPartialEq for RateLimitRevocation
Auto Trait Implementations§
impl Forget for RateLimitRevocation
impl Freeze for RateLimitRevocation
impl Move for RateLimitRevocation
impl RefUnwindSafe for RateLimitRevocation
impl Send for RateLimitRevocation
impl Sync for RateLimitRevocation
impl Unpin for RateLimitRevocation
impl UnsafeUnpin for RateLimitRevocation
impl UnwindSafe for RateLimitRevocation
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§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.