Enum cache::Reference
[−]
[src]
pub enum Reference<'a, V> { Spilled(V), Cached { guard: RwLockReadGuard<'a, ()>, ptr: *const ManuallyDrop<V>, }, }
A reference type to a value in the cache, either carrying the value itself (if an insert failed), or a readlock into the memory slab.
Variants
Spilled(V)
Value could not be put on the cache, and is returned as-is
Cached
Value resides in cache and is read-locked.
Fields of Cached
guard: RwLockReadGuard<'a, ()> | The readguard from a lock on the heap |
ptr: *const ManuallyDrop<V> | A pointer to a value on the heap |
Trait Implementations
impl<'a, V> Debug for Reference<'a, V> where
V: Debug,
[src]
V: Debug,