pub struct CacheEntry {
pub value: Vec<u8>,
pub stored_at: SystemTime,
}Fields§
§value: Vec<u8>§stored_at: SystemTimeImplementations§
Source§impl CacheEntry
impl CacheEntry
Sourcepub fn age_at(&self, now: SystemTime) -> Duration
pub fn age_at(&self, now: SystemTime) -> Duration
相对 now 的年龄;写入时间在未来(时钟回拨)时算 0。
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 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