[][src]Trait actix_web::guard::Guard

pub trait Guard {
    pub fn check(&self, request: &RequestHead) -> bool;

Trait defines resource guards. Guards are used for route selection.

Guards can not modify the request object. But it is possible to store extra attributes on a request by using the Extensions container. Extensions containers are available via the RequestHead::extensions() method.

Required methods

pub fn check(&self, request: &RequestHead) -> bool[src]

Check if request matches predicate

Loading content...


impl Guard for AllGuard[src]

impl Guard for AnyGuard[src]

impl<F> Guard for F where
    F: Fn(&RequestHead) -> bool

Loading content...