pub enum GuardResult<'a, Key, Val, We, B, L> {
Value(Val),
Guard(PlaceholderGuard<'a, Key, Val, We, B, L>),
Timeout,
}Expand description
Result of Cache::get_value_or_guard.
See also Cache::get_value_or_guard_async
which returns Result<Val, PlaceholderGuard> instead.
Variants§
Value(Val)
The value was found in the cache.
Guard(PlaceholderGuard<'a, Key, Val, We, B, L>)
The key was absent; use the guard to insert a value.
Timeout
Timed out waiting for another loader’s placeholder.
Trait Implementations§
Auto Trait Implementations§
impl<'a, Key, Val, We, B, L> Freeze for GuardResult<'a, Key, Val, We, B, L>where
Val: Freeze,
impl<'a, Key, Val, We, B, L> RefUnwindSafe for GuardResult<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> Send for GuardResult<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> Sync for GuardResult<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> Unpin for GuardResult<'a, Key, Val, We, B, L>where
Val: Unpin,
impl<'a, Key, Val, We, B, L> UnwindSafe for GuardResult<'a, Key, Val, We, B, L>
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