pub enum CachePhase {
Disabled(NoCacheReason),
Uninit,
Bypass,
CacheKey,
Hit,
Miss,
Stale,
StaleUpdating,
Expired,
Revalidated,
RevalidatedNoCache(NoCacheReason),
}
Expand description
This reflects the phase of HttpCache during the lifetime of a request
Variants§
Disabled(NoCacheReason)
Cache disabled, with reason (NeverEnabled if never explicitly used)
Uninit
Cache enabled but nothing is set yet
Bypass
Cache was enabled, the request decided not to use it
CacheKey
Awaiting the cache key to be generated
Hit
Cache hit
Miss
No cached asset is found
Stale
A staled (expired) asset is found
StaleUpdating
A staled (expired) asset was found, but another request is revalidating it
Expired
A staled (expired) asset was found, so a fresh one was fetched
Revalidated
A staled (expired) asset was found, and it was revalidated to be fresh
RevalidatedNoCache(NoCacheReason)
Revalidated, but deemed uncacheable, so we do not freshen it
Implementations§
Source§impl CachePhase
impl CachePhase
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Convert CachePhase as str
, for logging and debugging.
Trait Implementations§
Source§impl Clone for CachePhase
impl Clone for CachePhase
Source§fn clone(&self) -> CachePhase
fn clone(&self) -> CachePhase
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CachePhase
impl Debug for CachePhase
Source§impl PartialEq for CachePhase
impl PartialEq for CachePhase
impl Copy for CachePhase
impl Eq for CachePhase
impl StructuralPartialEq for CachePhase
Auto Trait Implementations§
impl Freeze for CachePhase
impl RefUnwindSafe for CachePhase
impl Send for CachePhase
impl Sync for CachePhase
impl Unpin for CachePhase
impl UnwindSafe for CachePhase
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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.