pub struct CacheEntry {
pub key: CacheKey,
pub value: String,
pub stored_at: CacheInstant,
pub freshness: FreshnessPolicy,
pub tags: InvalidationSet,
pub scope: CacheScope,
pub layers: CacheLayerPlan,
}Fields§
§key: CacheKey§value: String§stored_at: CacheInstant§freshness: FreshnessPolicy§scope: CacheScope§layers: CacheLayerPlanImplementations§
Source§impl CacheEntry
impl CacheEntry
pub fn age_seconds(&self, now: CacheInstant) -> u64
pub fn is_fresh(&self, now: CacheInstant) -> bool
pub fn is_stale_but_servable(&self, now: CacheInstant) -> bool
pub fn is_expired(&self, now: CacheInstant) -> bool
Trait Implementations§
Source§impl Clone for CacheEntry
impl Clone for CacheEntry
Source§fn clone(&self) -> CacheEntry
fn clone(&self) -> CacheEntry
Returns a duplicate 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 CacheEntry
impl Debug for CacheEntry
Source§impl<'de> Deserialize<'de> for CacheEntry
impl<'de> Deserialize<'de> for CacheEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CacheEntry
impl PartialEq for CacheEntry
Source§impl Serialize for CacheEntry
impl Serialize for CacheEntry
impl Eq for CacheEntry
impl StructuralPartialEq for CacheEntry
Auto Trait Implementations§
impl Freeze for CacheEntry
impl RefUnwindSafe for CacheEntry
impl Send for CacheEntry
impl Sync for CacheEntry
impl Unpin for CacheEntry
impl UnsafeUnpin for CacheEntry
impl UnwindSafe for CacheEntry
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