pub enum HitStatus {
Expired,
ForceExpired,
ForceMiss,
FailedHitFilter,
Fresh,
}Expand description
Freshness state of cache hit asset
Variants§
Expired
The asset’s freshness directives indicate it has expired
ForceExpired
The asset was marked as expired, and should be treated as stale
ForceMiss
The asset was marked as absent, and should be treated as a miss
FailedHitFilter
An error occurred while processing the asset, so it should be treated as a miss
Fresh
The asset is not expired
Implementations§
Source§impl HitStatus
impl HitStatus
Sourcepub fn is_treated_as_miss(self) -> bool
pub fn is_treated_as_miss(self) -> bool
Check whether the hit status should be treated as a miss. A forced miss is obviously treated as a miss. A hit-filter failure is treated as a miss because we can’t use the asset as an actual hit. If we treat it as expired, we still might not be able to use it even if revalidation succeeds.
Trait Implementations§
impl Copy for HitStatus
impl Eq for HitStatus
impl StructuralPartialEq for HitStatus
Auto Trait Implementations§
impl Freeze for HitStatus
impl RefUnwindSafe for HitStatus
impl Send for HitStatus
impl Sync for HitStatus
impl Unpin for HitStatus
impl UnwindSafe for HitStatus
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.