pub struct Or<L, R> { /* private fields */ }Expand description
Requires either predicate to return Cacheable.
Short-circuits: if the left predicate returns Cacheable,
the right predicate is not evaluated.
Implementations§
Trait Implementations§
Source§impl<L, R> Predicate for Or<L, R>
impl<L, R> Predicate for Or<L, R>
Source§fn check<'life0, 'async_trait>(
&'life0 self,
subject: <Or<L, R> as Predicate>::Subject,
) -> Pin<Box<dyn Future<Output = PredicateResult<<Or<L, R> as Predicate>::Subject>> + Send + 'async_trait>>where
'life0: 'async_trait,
Or<L, R>: 'async_trait,
fn check<'life0, 'async_trait>(
&'life0 self,
subject: <Or<L, R> as Predicate>::Subject,
) -> Pin<Box<dyn Future<Output = PredicateResult<<Or<L, R> as Predicate>::Subject>> + Send + 'async_trait>>where
'life0: 'async_trait,
Or<L, R>: 'async_trait,
Evaluate whether the subject should be cached. Read more
Auto Trait Implementations§
impl<L, R> Freeze for Or<L, R>
impl<L, R> RefUnwindSafe for Or<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Or<L, R>
impl<L, R> Sync for Or<L, R>
impl<L, R> Unpin for Or<L, R>
impl<L, R> UnwindSafe for Or<L, R>where
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
Source§impl<P> BodyPredicate for Pwhere
P: Predicate,
impl<P> BodyPredicate for Pwhere
P: Predicate,
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<P> HeaderPredicate for Pwhere
P: Predicate,
impl<P> HeaderPredicate for Pwhere
P: Predicate,
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<P> MethodPredicate for Pwhere
P: Predicate,
impl<P> MethodPredicate for Pwhere
P: Predicate,
Source§impl<P> PathPredicate for Pwhere
P: Predicate,
impl<P> PathPredicate for Pwhere
P: Predicate,
Source§impl<T> PredicateExt for Twhere
T: Predicate,
impl<T> PredicateExt for Twhere
T: Predicate,
Source§impl<P> QueryPredicate for Pwhere
P: Predicate,
impl<P> QueryPredicate for Pwhere
P: Predicate,
Source§impl<P> StatusCodePredicate for Pwhere
P: Predicate,
impl<P> StatusCodePredicate for Pwhere
P: Predicate,
Source§fn status_code(self, status_code: StatusCode) -> StatusCode<P>
fn status_code(self, status_code: StatusCode) -> StatusCode<P>
Matches an exact status code.
Source§fn status_code_in(self, codes: Vec<StatusCode>) -> StatusCode<P>
fn status_code_in(self, codes: Vec<StatusCode>) -> StatusCode<P>
Matches any of the specified status codes.
Source§fn status_code_range(self, start: StatusCode, end: StatusCode) -> StatusCode<P>
fn status_code_range(self, start: StatusCode, end: StatusCode) -> StatusCode<P>
Matches status codes within a range (inclusive).
Source§fn status_code_class(self, class: StatusClass) -> StatusCode<P>
fn status_code_class(self, class: StatusClass) -> StatusCode<P>
Matches all status codes in a class (e.g., all 2xx).
Source§impl<P> VersionPredicate for Pwhere
P: Predicate,
impl<P> VersionPredicate for Pwhere
P: Predicate,
Source§fn version(self, operation: Operation) -> HttpVersion<P>
fn version(self, operation: Operation) -> HttpVersion<P>
Adds a version match to this predicate chain.