Struct actix_web::guard::Not [−][src]
pub struct Not<G>(pub G);
Expand description
Wraps a guard and inverts the outcome of it’s Guard
implementation.
Examples
The handler below will be called for any request method apart from GET
.
use actix_web::{guard, web, HttpResponse};
web::route()
.guard(guard::Not(guard::Get()))
.to(|| HttpResponse::Ok());
Tuple Fields
0: G
Trait Implementations
Auto Trait Implementations
impl<G> RefUnwindSafe for Not<G> where
G: RefUnwindSafe,
impl<G> UnwindSafe for Not<G> where
G: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more