docs(server): greatly expand how to use a Server

This commit is contained in:
Sean McArthur
2015-06-12 17:31:17 -07:00
parent 7452dfab69
commit ae5c7276c0
3 changed files with 136 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ impl<'a, 'b: 'a> Request<'a, 'b> {
}
/// Deconstruct a Request into its constituent parts.
#[inline]
pub fn deconstruct(self) -> (SocketAddr, Method, Headers,
RequestUri, HttpVersion,
HttpReader<&'a mut BufReader<&'b mut NetworkStream>>) {
@@ -74,6 +75,7 @@ impl<'a, 'b: 'a> Request<'a, 'b> {
}
impl<'a, 'b> Read for Request<'a, 'b> {
#[inline]
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
self.body.read(buf)
}