pub struct CacheEntry {
pub value: Arc<[u8]>,
pub created: SystemTime,
pub revalidate: Option<Duration>,
pub tags: Vec<String>,
pub meta: BTreeMap<String, String>,
}Expand description
A cached value with freshness information.
Fields§
§value: Arc<[u8]>§created: SystemTime§revalidate: Option<Duration>Entry becomes stale (not invalid) after this long. None = never.
meta: BTreeMap<String, String>Free-form metadata (e.g. response headers, status).
Implementations§
Trait Implementations§
Source§impl Clone for CacheEntry
impl Clone for CacheEntry
Source§impl Debug for CacheEntry
impl Debug for CacheEntry
impl Eq for CacheEntry
Source§impl PartialEq for CacheEntry
impl PartialEq for CacheEntry
impl StructuralPartialEq for CacheEntry
Auto Trait Implementations§
impl Forget for CacheEntry
impl Freeze for CacheEntry
impl Move 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