improvements

This commit is contained in:
Sean McArthur
2016-10-16 09:40:28 -07:00
parent 9bfdcec052
commit d78eff6918
6 changed files with 104 additions and 22 deletions

37
src/body.rs Normal file
View File

@@ -0,0 +1,37 @@
use std::io::Read;
pub struct Body(Kind);
impl Body {
pub fn sized(reader: (), len: u64) -> Body {
unimplemented!()
}
pub fn chunked(reader: ()) -> Body {
unimplemented!()
}
}
enum Kind {
Length,
Chunked
}
impl From<Vec<u8>> for Body {
#[inline]
fn from(v: Vec<u8>) -> Body {
unimplemented!()
}
}
impl From<String> for Body {
#[inline]
fn from(s: String) -> Body {
s.into_bytes().into()
}
}
/// Wraps a `std::io::Write`.
pub struct Pipe(Kind);