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