Struct iron::request::Request  
                   
                       [−]
                   
               [src]
pub struct Request<'a, 'b: 'a> {
    pub url: Url,
    pub remote_addr: SocketAddr,
    pub local_addr: SocketAddr,
    pub headers: Headers,
    pub body: Body<'a, 'b>,
    pub method: Method,
    pub extensions: TypeMap,
}The Request given to all Middleware.
Stores all the properties of the client's request plus
an TypeMap for data communication between middleware.
Fields
url: Url
                           The requested URL.
remote_addr: SocketAddr
                           The originating address of the request.
local_addr: SocketAddr
                           The local address of the request.
headers: Headers
                           The request headers.
body: Body<'a, 'b>
                           The request body as a reader.
method: Method
                           The request method.
extensions: TypeMap
                           Extensible storage for data passed between middleware.
Methods
impl<'a, 'b> Request<'a, 'b>[src]
fn from_http(req: HttpRequest<'a, 'b>, local_addr: SocketAddr, protocol: &Protocol) -> Result<Request<'a, 'b>, String>
Create a request from an HttpRequest.
This constructor consumes the HttpRequest.
Trait Implementations
impl<'a, 'b> Debug for Request<'a, 'b>[src]
impl<'a, 'b> Extensible for Request<'a, 'b>[src]
fn extensions(&self) -> &TypeMap
Get a reference to the type's extension storage.
fn extensions_mut(&mut self) -> &mut TypeMap
Get a mutable reference to the type's extension storage.
impl<'a, 'b> Plugin for Request<'a, 'b>[src]
fn get<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Clone, P::Value: Any
Return a copy of the plugin's produced value. Read more
fn get_ref<P>(&mut self) -> Result<&P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Any
Return a reference to the plugin's produced value. Read more
fn get_mut<P>(&mut self) -> Result<&mut P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Any
Return a mutable reference to the plugin's produced value. Read more
fn compute<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>
Create and evaluate a once-off instance of a plugin.