pub enum ObjectCacheResult<'a, V: Value> {
Value(V),
Placeholder(Box<dyn ObjectCachePlaceholder<V> + 'a>),
NoCache,
}Expand description
Possible results for a cache lookup_or_reserve()
Variants§
Value(V)
Contains the value successfully retrieved from the cache.
Placeholder(Box<dyn ObjectCachePlaceholder<V> + 'a>)
The object was not found in the cache, so this placeholder can be used to insert the calculated result.
NoCache
Returned for items that are not wanted to be inserted into the cache.
Trait Implementations§
Auto Trait Implementations§
impl<'a, V> Freeze for ObjectCacheResult<'a, V>where
V: Freeze,
impl<'a, V> !RefUnwindSafe for ObjectCacheResult<'a, V>
impl<'a, V> Send for ObjectCacheResult<'a, V>
impl<'a, V> Sync for ObjectCacheResult<'a, V>
impl<'a, V> Unpin for ObjectCacheResult<'a, V>
impl<'a, V> !UnwindSafe for ObjectCacheResult<'a, V>
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more