pub enum EntryResult<'a, Key, Val, We, B, L, T> {
Retained(T),
Removed(Key, Val),
Replaced(PlaceholderGuard<'a, Key, Val, We, B, L>, Val),
Vacant(PlaceholderGuard<'a, Key, Val, We, B, L>),
Timeout,
}Expand description
Result of an entry or
entry_async operation.
Variants§
Retained(T)
The key existed and the callback returned EntryAction::Retain.
Contains the value T returned by the callback.
Removed(Key, Val)
The key existed and the callback returned EntryAction::Remove.
Contains the removed key and value.
Replaced(PlaceholderGuard<'a, Key, Val, We, B, L>, Val)
The key existed and the callback returned EntryAction::ReplaceWithGuard.
Contains a PlaceholderGuard for re-insertion and the old value.
Vacant(PlaceholderGuard<'a, Key, Val, We, B, L>)
The key was absent. Contains a PlaceholderGuard for inserting a new value.
Timeout
Timed out waiting for another loader’s placeholder.
Only returned by Cache::entry,
which accepts a timeout parameter. For the async variant, use an external
timeout mechanism (e.g. tokio::time::timeout).
Trait Implementations§
Auto Trait Implementations§
impl<'a, Key, Val, We, B, L, T> Freeze for EntryResult<'a, Key, Val, We, B, L, T>
impl<'a, Key, Val, We, B, L, T> RefUnwindSafe for EntryResult<'a, Key, Val, We, B, L, T>
impl<'a, Key, Val, We, B, L, T> Send for EntryResult<'a, Key, Val, We, B, L, T>
impl<'a, Key, Val, We, B, L, T> Sync for EntryResult<'a, Key, Val, We, B, L, T>
impl<'a, Key, Val, We, B, L, T> Unpin for EntryResult<'a, Key, Val, We, B, L, T>
impl<'a, Key, Val, We, B, L, T> UnwindSafe for EntryResult<'a, Key, Val, We, B, L, 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