FilterFn

Trait FilterFn 

Source
pub trait FilterFn:
    Send
    + Sync
    + 'static {
    // Required method
    fn filter(&self, request: &Request<Body>) -> bool;
}
Expand description

Used by the Filter HttpResponder to decide which requests to forward and which to ignore.

Required Methods§

Source

fn filter(&self, request: &Request<Body>) -> bool

Return true iff Filter should forward the request to its wrapped Responder.

Implementors§

Source§

impl<F> FilterFn for F
where F: Fn(&Request<Body>) -> bool + Send + Sync + 'static,