pub enum CacheState<Cached> {
Stale(Cached),
Actual(Cached),
Expired(Cached),
}Expand description
Freshness state of cached data.
Represents the time-based state of a cached value relative to its staleness and expiration timestamps.
Variants§
Stale(Cached)
Data is stale but not expired (usable, should refresh in background).
Actual(Cached)
Data is fresh and valid.
Expired(Cached)
Data has expired (must refresh before use).
Trait Implementations§
Source§impl<Cached: Debug> Debug for CacheState<Cached>
impl<Cached: Debug> Debug for CacheState<Cached>
Source§impl<Cached: PartialEq> PartialEq for CacheState<Cached>
impl<Cached: PartialEq> PartialEq for CacheState<Cached>
impl<Cached: Eq> Eq for CacheState<Cached>
impl<Cached> StructuralPartialEq for CacheState<Cached>
Auto Trait Implementations§
impl<Cached> Freeze for CacheState<Cached>where
Cached: Freeze,
impl<Cached> RefUnwindSafe for CacheState<Cached>where
Cached: RefUnwindSafe,
impl<Cached> Send for CacheState<Cached>where
Cached: Send,
impl<Cached> Sync for CacheState<Cached>where
Cached: Sync,
impl<Cached> Unpin for CacheState<Cached>where
Cached: Unpin,
impl<Cached> UnwindSafe for CacheState<Cached>where
Cached: UnwindSafe,
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