pub enum CachedState<T> {
EmptyCache,
ValueCached(T),
Inflight,
}
Expand description
An enum representing the state of an instance of Cached
, returned by Cached::force_recompute
.
Variants§
EmptyCache
The cache is empty and there is no inflight computation happening.
ValueCached(T)
A cached value is present.
Inflight
An inflight computation is currently happening.
Implementations§
Source§impl<T> CachedState<T>
impl<T> CachedState<T>
Trait Implementations§
Source§impl<T: Clone> Clone for CachedState<T>
impl<T: Clone> Clone for CachedState<T>
Source§fn clone(&self) -> CachedState<T>
fn clone(&self) -> CachedState<T>
Returns a copy 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 CachedState<T>
impl<T: Debug> Debug for CachedState<T>
Source§impl<T: PartialEq> PartialEq for CachedState<T>
impl<T: PartialEq> PartialEq for CachedState<T>
impl<T: Copy> Copy for CachedState<T>
impl<T: Eq> Eq for CachedState<T>
impl<T> StructuralPartialEq for CachedState<T>
Auto Trait Implementations§
impl<T> Freeze for CachedState<T>where
T: Freeze,
impl<T> RefUnwindSafe for CachedState<T>where
T: RefUnwindSafe,
impl<T> Send for CachedState<T>where
T: Send,
impl<T> Sync for CachedState<T>where
T: Sync,
impl<T> Unpin for CachedState<T>where
T: Unpin,
impl<T> UnwindSafe for CachedState<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