pub enum Freshness {
Fresh,
Stale,
}Expand description
Whether an entry is still within its logical freshness window.
An entry physically present in the cache is always one of these two states: beyond the physical expiration the backend has already evicted it, so a third “gone” state is unrepresentable here.
Variants§
Fresh
now is before the logical expiration — safe to return directly.
Stale
now is at or after the logical expiration — only usable as a fail-safe
fallback.
Implementations§
Trait Implementations§
impl Copy for Freshness
impl Eq for Freshness
impl StructuralPartialEq for Freshness
Auto Trait Implementations§
impl Freeze for Freshness
impl RefUnwindSafe for Freshness
impl Send for Freshness
impl Sync for Freshness
impl Unpin for Freshness
impl UnsafeUnpin for Freshness
impl UnwindSafe for Freshness
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.