pub struct TimedCache<T> { /* private fields */ }
Implementations§
Source§impl<T> TimedCache<T>
impl<T> TimedCache<T>
pub fn new(value: T, lifetime: Duration) -> Self
pub fn cache_update(&mut self) -> &mut Self
pub fn is_cache_timed_out(&self) -> bool
Trait Implementations§
Source§impl<T> Deref for TimedCache<T>
impl<T> Deref for TimedCache<T>
Auto Trait Implementations§
impl<T> Freeze for TimedCache<T>where
T: Freeze,
impl<T> RefUnwindSafe for TimedCache<T>where
T: RefUnwindSafe,
impl<T> Send for TimedCache<T>where
T: Send,
impl<T> Sync for TimedCache<T>where
T: Sync,
impl<T> Unpin for TimedCache<T>where
T: Unpin,
impl<T> UnwindSafe for TimedCache<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