pub trait Predicate:
Send
+ Sync
+ Debug {
// Required methods
fn matches<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ProxyRequest,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn predicate_type(&self) -> &str;
}
Expand description
A predicate that determines if a request matches a route.
Required Methods§
Sourcefn matches<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ProxyRequest,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn matches<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ProxyRequest,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if the request matches this predicate.
Sourcefn predicate_type(&self) -> &str
fn predicate_type(&self) -> &str
Get the predicate type.