pub fn Any<F: Guard + 'static>(guard: F) -> AnyGuard
Expand description
Creates a guard that matches if any added guards match.
Examples
The handler below will be called for either request method GET
or POST
.
use actix_web::{web, guard, HttpResponse};
web::route()
.guard(
guard::Any(guard::Get())
.or(guard::Post()))
.to(|| HttpResponse::Ok());