pub fn Any<F: Guard + 'static>(guard: F) -> AnyGuardExpand description
Return guard that matches if any of supplied guards.
use ntex::web::{self, guard, App, HttpResponse};
fn main() {
App::default().service(web::resource("/index.html").route(
web::route()
.guard(guard::Any(guard::Get()).or(guard::Post()))
.to(async || { HttpResponse::MethodNotAllowed() }))
);
}