pub enum CacheStatus<R: CustomBypassReason = CustomBypassReasonDummy> {
Disabled,
Bypass(CacheBypassReason<R>),
Hit,
Miss,
}Expand description
Status of the cache lookup operation
Variants§
Implementations§
Source§impl<B: CustomBypassReason> CacheStatus<B>
impl<B: CustomBypassReason> CacheStatus<B>
Sourcepub fn with_response<T>(self, resp: Response<T>) -> Response<T>
pub fn with_response<T>(self, resp: Response<T>) -> Response<T>
Injects itself into a given response to be accessible by middleware
Trait Implementations§
Source§impl<R: Clone + CustomBypassReason> Clone for CacheStatus<R>
impl<R: Clone + CustomBypassReason> Clone for CacheStatus<R>
Source§fn clone(&self) -> CacheStatus<R>
fn clone(&self) -> CacheStatus<R>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R: Debug + CustomBypassReason> Debug for CacheStatus<R>
impl<R: Debug + CustomBypassReason> Debug for CacheStatus<R>
Source§impl<R: CustomBypassReason> Default for CacheStatus<R>
impl<R: CustomBypassReason> Default for CacheStatus<R>
Source§fn default() -> CacheStatus<R>
fn default() -> CacheStatus<R>
Returns the “default value” for a type. Read more
Source§impl<R: CustomBypassReason> Display for CacheStatus<R>
impl<R: CustomBypassReason> Display for CacheStatus<R>
Source§impl<'_derivative_strum, R: CustomBypassReason> From<&'_derivative_strum CacheStatus<R>> for &'static str
impl<'_derivative_strum, R: CustomBypassReason> From<&'_derivative_strum CacheStatus<R>> for &'static str
Source§fn from(x: &'_derivative_strum CacheStatus<R>) -> &'static str
fn from(x: &'_derivative_strum CacheStatus<R>) -> &'static str
Converts to this type from the input type.
Source§impl<R: CustomBypassReason> From<CacheStatus<R>> for &'static str
impl<R: CustomBypassReason> From<CacheStatus<R>> for &'static str
Source§fn from(x: CacheStatus<R>) -> &'static str
fn from(x: CacheStatus<R>) -> &'static str
Converts to this type from the input type.
Source§impl<R: PartialEq + CustomBypassReason> PartialEq for CacheStatus<R>
impl<R: PartialEq + CustomBypassReason> PartialEq for CacheStatus<R>
impl<R: Eq + CustomBypassReason> Eq for CacheStatus<R>
impl<R: CustomBypassReason> StructuralPartialEq for CacheStatus<R>
Auto Trait Implementations§
impl<R> Freeze for CacheStatus<R>where
R: Freeze,
impl<R> RefUnwindSafe for CacheStatus<R>where
R: RefUnwindSafe,
impl<R> Send for CacheStatus<R>
impl<R> Sync for CacheStatus<R>
impl<R> Unpin for CacheStatus<R>where
R: Unpin,
impl<R> UnwindSafe for CacheStatus<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.