/// Extract Auth token from the "Authorization" header.
///
/// Handlers with Auth guard will fail with 503 error.
/// Handlers with Option<Auth> will be called with None.
Extract Auth token from the "Authorization" header.
Handlers with Auth guard will fail with 503 error.
Handlers with Option will be called with None.
Extract Auth token from the " Authorization " header . Handlers with Auth guard will fail with 503 error . Handlers with Option will be called with None .
fn from_request(request: &'a Request<'r>) -> request::Outcome<Auth, Self::Error> {
        let state: State<config::AppState> = request.guard()?;
        if let Some(auth) = extract_auth_from_request(request, &state.secret) {
            Outcome::Success(auth)
        } else {
            Outcome::Failure((Status::Forbidden, ()))
        }
    }
fn from_request ( request : & ' a Request < ' r > ) -> request :: Outcome < Auth , Self :: Error > { let state : State < config :: AppState > = request . guard ( ) ? ; if let Some ( auth ) = extract_auth_from_request ( request , & state . secret ) { Outcome :: Success ( auth ) } else { Outcome :: Failure ( ( Status :: Forbidden , ( ) ) ) } }
Extract Auth token from the "Authorization" header.
Extract Auth token from the " Authorization " header .
request
&'a Request<'r>