Skip to main content

Guard

Type Alias Guard 

Source
pub type Guard<S> = Arc<dyn Fn(&Request, &ConnectionInfo, &S) -> Result<(), Response> + Send + Sync>;
Expand description

A route guard: Ok(()) lets the request through, Err(response) answers it (a redirect to the login page, a 401, a 403).

Aliased Typeยง

pub struct Guard<S> { /* private fields */ }