mirror of https://github.com/fafhrd91/actix-web
Update guard.rs
This commit is contained in:
parent
024c3ad92c
commit
20624eb379
|
@ -31,9 +31,9 @@ use actix_http::RequestHead;
|
||||||
|
|
||||||
/// Trait defines resource guards. Guards are used for route selection.
|
/// Trait defines resource guards. Guards are used for route selection.
|
||||||
///
|
///
|
||||||
//! Guards can not modify the request object. But it is possible
|
/// Guards can not modify the request object. But it is possible
|
||||||
//! to store extra attributes on a request by using the `Extensions` container.
|
/// to store extra attributes on a request by using the `Extensions` container.
|
||||||
//! Extensions containers are available via the `RequestHead::extensions()` method.
|
/// Extensions containers are available via the `RequestHead::extensions()` method.
|
||||||
pub trait Guard {
|
pub trait Guard {
|
||||||
/// Check if request matches predicate
|
/// Check if request matches predicate
|
||||||
fn check(&self, request: &RequestHead) -> bool;
|
fn check(&self, request: &RequestHead) -> bool;
|
||||||
|
|
Loading…
Reference in New Issue