pub struct ExpiryValue<T> { /* private fields */ }Expand description
A struct to contain a value and its expiry information
Implementations§
Source§impl<T> ExpiryValue<T>
impl<T> ExpiryValue<T>
Sourcepub fn not_expired(&self) -> bool
pub fn not_expired(&self) -> bool
if this entry has not expired, and should be kept
Trait Implementations§
Source§impl<T: Clone> Clone for ExpiryValue<T>
impl<T: Clone> Clone for ExpiryValue<T>
Source§fn clone(&self) -> ExpiryValue<T>
fn clone(&self) -> ExpiryValue<T>
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<T: Debug> Debug for ExpiryValue<T>
impl<T: Debug> Debug for ExpiryValue<T>
Auto Trait Implementations§
impl<T> Freeze for ExpiryValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExpiryValue<T>where
T: RefUnwindSafe,
impl<T> Send for ExpiryValue<T>where
T: Send,
impl<T> Sync for ExpiryValue<T>where
T: Sync,
impl<T> Unpin for ExpiryValue<T>where
T: Unpin,
impl<T> UnwindSafe for ExpiryValue<T>where
T: 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