Trait Predicate

Source
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§

Source

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.

Source

fn predicate_type(&self) -> &str

Get the predicate type.

Implementors§