pub struct Value<V> { /* private fields */ }
Expand description
Represents an entry in the cache.
Wraps a value with an expiration timestamp and an expired flag.
Implementations§
Source§impl<V> Value<V>
impl<V> Value<V>
Sourcepub fn into_inner(self) -> V
pub fn into_inner(self) -> V
Consumes the Value
and returns its inner value.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if the value is expired.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for Value<V>where
V: Freeze,
impl<V> RefUnwindSafe for Value<V>where
V: RefUnwindSafe,
impl<V> Send for Value<V>where
V: Send,
impl<V> Sync for Value<V>where
V: Sync,
impl<V> Unpin for Value<V>where
V: Unpin,
impl<V> UnwindSafe for Value<V>where
V: 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