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

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

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

Guard can not modify request object. But it is possible to to store extra attributes on request by using Extensions container, Extensions container available via RequestHead::extensions() method.

Required methods

fn check(&self, request: &RequestHead) -> bool

Check if request matches predicate

Loading content...

Implementors

impl Guard for AllGuard[src]

impl Guard for AnyGuard[src]

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

Loading content...