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

Value could not be put on the cache, and is returned as-is

Value resides in cache and is read-locked.

Fields of Cached

The readguard from a lock on the heap

A pointer to a value on the heap

Trait Implementations

impl<'a, V> Debug for Reference<'a, V> where
    V: Debug
[src]

Formats the value using the given formatter.

impl<'a, V> Deref for Reference<'a, V>
[src]

The resulting type after dereferencing

The method called to dereference a value