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> 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