Trait actix_web::guard::Guard

source ·
pub trait Guard {
    // Required method
    fn check(&self, ctx: &GuardContext<'_>) -> bool;
}
Expand description

Interface for routing guards.

See module level documentation for more.

Required Methods§

source

fn check(&self, ctx: &GuardContext<'_>) -> bool

Returns true if predicate condition is met for a given request.

Implementations on Foreign Types§

source§

impl Guard for Rc<dyn Guard>

source§

fn check(&self, ctx: &GuardContext<'_>) -> bool

Implementors§

source§

impl Guard for Acceptable

source§

impl Guard for AllGuard

source§

impl Guard for AnyGuard

source§

impl<F> Guard for Fwhere F: Fn(&GuardContext<'_>) -> bool,

source§

impl<G: Guard> Guard for Not<G>