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 for CacheAction
impl PartialEq for CacheAction
impl Copy for CacheAction
impl Eq for CacheAction
impl StructuralPartialEq for CacheAction
Auto Trait Implementations§
impl Freeze for CacheAction
impl RefUnwindSafe for CacheAction
impl Send for CacheAction
impl Sync for CacheAction
impl Unpin for CacheAction
impl UnwindSafe for CacheAction
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more