Function actix_web::pred::All
[−]
[src]
pub fn All<S: 'static, P: Predicate<S> + 'static>(pred: P) -> AllPredicate<S>
Return predicate that matches if all of supplied predicate matches.
use actix_web::pred; fn main() { Application::new() .resource("/index.html", |r| r.route() .filter(pred::All(pred::Get()) .and(pred::Header("content-type", "plain/text"))) .h(HttpMethodNotAllowed)); }