pub struct DefaultPredicate;Expand description
A PassthroughPredicate with sensible defaults for controlling ETag cache behaviour
Trait Implementations§
Source§impl Clone for DefaultPredicate
impl Clone for DefaultPredicate
Source§fn clone(&self) -> DefaultPredicate
fn clone(&self) -> DefaultPredicate
Returns a duplicate 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 DefaultPredicate
impl Debug for DefaultPredicate
Source§impl Default for DefaultPredicate
impl Default for DefaultPredicate
Source§fn default() -> DefaultPredicate
fn default() -> DefaultPredicate
Returns the “default value” for a type. Read more
Source§impl Hash for DefaultPredicate
impl Hash for DefaultPredicate
Source§impl Ord for DefaultPredicate
impl Ord for DefaultPredicate
Source§fn cmp(&self, other: &DefaultPredicate) -> Ordering
fn cmp(&self, other: &DefaultPredicate) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DefaultPredicate
impl PartialEq for DefaultPredicate
Source§impl PartialOrd for DefaultPredicate
impl PartialOrd for DefaultPredicate
Source§impl PassthroughPredicate for DefaultPredicate
impl PassthroughPredicate for DefaultPredicate
Source§fn should_passthrough_req<T>(&mut self, req: &Request<T>) -> bool
fn should_passthrough_req<T>(&mut self, req: &Request<T>) -> bool
Only run GET and HEAD methods through cache services
Source§fn should_passthrough_resp<T>(&mut self, resp: &Response<T>) -> bool
fn should_passthrough_resp<T>(&mut self, resp: &Response<T>) -> bool
Only cache:
- 2XX responses excluding 204 No Content
- responses that dont already have ETag header set
- responses that either dont have a valid Content-Length header or have a non-zero Content-Length
impl Copy for DefaultPredicate
impl Eq for DefaultPredicate
impl StructuralPartialEq for DefaultPredicate
Auto Trait Implementations§
impl Freeze for DefaultPredicate
impl RefUnwindSafe for DefaultPredicate
impl Send for DefaultPredicate
impl Sync for DefaultPredicate
impl Unpin for DefaultPredicate
impl UnwindSafe for DefaultPredicate
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