enum Raced<T> {
Cache(T),
Server(T),
Fallback(T),
Failed(RepoError),
}Expand description
Outcome of racing a cache read that missed the fast path against the
server. See HybridRepository::race_slow_cache.
Variants§
Cache(T)
The cache answered first with something to show (exclusions applied).
Server(T)
The server answered first, or the cache had nothing. Raw: the caller caches the full page and applies exclusions to what it returns.
Fallback(T)
The server failed; this is what the cache said instead (exclusions applied), possibly an empty listing — which still beats an error.
Failed(RepoError)
Neither could answer; the server’s error.
Auto Trait Implementations§
impl<T> Freeze for Raced<T>where
T: Freeze,
impl<T> RefUnwindSafe for Raced<T>where
T: RefUnwindSafe,
impl<T> Send for Raced<T>where
T: Send,
impl<T> Sync for Raced<T>where
T: Sync,
impl<T> Unpin for Raced<T>where
T: Unpin,
impl<T> UnsafeUnpin for Raced<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Raced<T>where
T: UnwindSafe,
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