pub enum EntryOrPlaceholder<Key, Val, Plh, T> {
Kept(T),
Removed(Key, Val),
Replaced(Plh, Val),
ExistingPlaceholder(Plh),
NewPlaceholder(Plh),
}Expand description
Result of an entry-or-placeholder operation at the shard level.
Variants§
Kept(T)
Callback returned Retain(T) — entry is still in the cache.
Removed(Key, Val)
Callback returned Remove — entry was removed.
Replaced(Plh, Val)
Callback returned ReplaceWithGuard — entry was replaced with a placeholder.
The old value is returned so it can be dropped outside the lock.
ExistingPlaceholder(Plh)
Found an existing placeholder (another loader is working on this key).
NewPlaceholder(Plh)
No entry existed, a new placeholder was created.
Auto Trait Implementations§
impl<Key, Val, Plh, T> Freeze for EntryOrPlaceholder<Key, Val, Plh, T>
impl<Key, Val, Plh, T> RefUnwindSafe for EntryOrPlaceholder<Key, Val, Plh, T>
impl<Key, Val, Plh, T> Send for EntryOrPlaceholder<Key, Val, Plh, T>
impl<Key, Val, Plh, T> Sync for EntryOrPlaceholder<Key, Val, Plh, T>
impl<Key, Val, Plh, T> Unpin for EntryOrPlaceholder<Key, Val, Plh, T>
impl<Key, Val, Plh, T> UnwindSafe for EntryOrPlaceholder<Key, Val, Plh, T>
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