Struct hyper::server::request::Request
[-] [+]
[src]
pub struct Request<'a> { pub remote_addr: SocketAddr, pub method: Method, pub headers: Headers, pub uri: RequestUri, pub version: HttpVersion, // some fields omitted }
A request bundles several parts of an incoming NetworkStream
, given to a Handler
.
Fields
Methods
impl<'a> Request<'a>
fn new(stream: &'a mut Read + 'a, addr: SocketAddr) -> HttpResult<Request<'a>>
Create a new Request, reading the StartLine and Headers so they are immediately useful.
fn deconstruct(self) -> (SocketAddr, Method, Headers, RequestUri, HttpVersion, HttpReader<&'a mut Read + 'a>)
Deconstruct a Request into its constituent parts.