Trait 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 F
where F: Fn(&GuardContext<'_>) -> bool,

Source§

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