from_request.rs
imports http::Acceptimports http::ContentType
SHA-256e3dbb600e6de595836c1e789963b9bdbea68e29fd4de0539329d6a8c0d3e1f0b
MaleculeMd(In₈)
Evidence
1use std::fmt::Debug;
2use std::net::SocketAddr;
3
4use router::Route;
5use request::Request;
6use outcome::{self, IntoOutcome};
7use outcome::Outcome::*;
8
9use http::{Status, ContentType, Accept, Method, Cookies};
10use http::uri::URI;
11
12/// Type alias for the `Outcome` of a `FromRequest` conversion.
13pub type Outcome<S, E> = outcome::Outcome<S, (Status, E), ()> …
39:8… equest Guards
40///
41/// A request guard is a type that represents an arbitrary validation policy.
42/// The validation policy is implemented through `Fr …
53:30… er makes use of three request guards, `A`, `B`, and
54/// `C`. An input type can be identified as a request guard if it is not named
55/// in the route attribute. This is why, for instance, `param` is not a request
56/// guard.
57///
58/// ```rust,ignore
59/// #[get("/<p …
81:12… e `Outcome` is `Failure`, the request will fail with the given status
82/// code and error. The designated error
83/// [Catcher](/rocket/struct.Catc …