pub enum CachedValue<'a, T> {
Ext(&'a T),
New(&'a T),
Old(&'a T),
}Expand description
A reference provided by the cache
The variants are used to reflect the state of the cache when it has been obtained. All variants carry a reference to the same type of object, available through Deref.
Variants§
Ext(&'a T)
The reference has been forwarded from another owner
New(&'a T)
The reference has just been added to the cache
Old(&'a T)
The reference was already in the cache
Implementations§
Trait Implementations§
Source§impl<'a, T: Clone> Clone for CachedValue<'a, T>
impl<'a, T: Clone> Clone for CachedValue<'a, T>
Source§fn clone(&self) -> CachedValue<'a, T>
fn clone(&self) -> CachedValue<'a, 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<'a, T: Debug> Debug for CachedValue<'a, T>
impl<'a, T: Debug> Debug for CachedValue<'a, T>
Source§impl<'a, T> Deref for CachedValue<'a, T>
impl<'a, T> Deref for CachedValue<'a, T>
Source§impl<'a, T: PartialEq> PartialEq for CachedValue<'a, T>
impl<'a, T: PartialEq> PartialEq for CachedValue<'a, T>
impl<'a, T: Copy> Copy for CachedValue<'a, T>
impl<'a, T: Eq> Eq for CachedValue<'a, T>
impl<'a, T> StructuralPartialEq for CachedValue<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for CachedValue<'a, T>
impl<'a, T> RefUnwindSafe for CachedValue<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CachedValue<'a, T>where
T: Sync,
impl<'a, T> Sync for CachedValue<'a, T>where
T: Sync,
impl<'a, T> Unpin for CachedValue<'a, T>
impl<'a, T> UnwindSafe for CachedValue<'a, T>where
T: RefUnwindSafe,
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