Enum kvarn::host::CacheAction
source · pub enum CacheAction {
Cache,
Drop,
}
Expand description
Per host filter output of whether or not to cache a response with some StatusCode
.
Variants§
Cache
Cache this status code response.
Drop
Don’t cache, in hope following responses have status codes which can be cached.
Implementations§
source§impl CacheAction
impl CacheAction
sourcepub fn from_cache(cache: bool) -> Self
pub fn from_cache(cache: bool) -> Self
Returns Self::Cache
if cache
is true. Else Self::Drop
.
sourcepub fn from_drop(drop: bool) -> Self
pub fn from_drop(drop: bool) -> Self
Returns Self::Drop
if drop
is true. Else Self::Cache
.
sourcepub fn into_cache(self) -> bool
pub fn into_cache(self) -> bool
Returns true if self
is Self::Cache
.
sourcepub fn into_drop(self) -> bool
pub fn into_drop(self) -> bool
Returns true if self
is Self::Drop
.
Trait Implementations§
source§impl Clone for CacheAction
impl Clone for CacheAction
source§fn clone(&self) -> CacheAction
fn clone(&self) -> CacheAction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CacheAction
impl Debug for CacheAction
source§impl PartialEq<CacheAction> for CacheAction
impl PartialEq<CacheAction> for CacheAction
source§fn eq(&self, other: &CacheAction) -> bool
fn eq(&self, other: &CacheAction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CacheAction
impl Eq for CacheAction
impl StructuralEq for CacheAction
impl StructuralPartialEq for CacheAction
Auto Trait Implementations§
impl RefUnwindSafe for CacheAction
impl Send for CacheAction
impl Sync for CacheAction
impl Unpin for CacheAction
impl UnwindSafe for CacheAction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.