Struct tk_http::server::RawBody
[−]
[src]
pub struct RawBody<S> { /* fields omitted */ }The actual raw body
The object is used to write some data directly to the socket without any buffering/copying. Note that chunked encoding must be handled manually in this case.
This is a tiny wrapper around WriteRaw which is basically tiny wrapper
around TcpStream or whatever S represents. Wrappers are used to
reconstruct original object, EncoderDone in this case.
Methods
impl<S: Io> RawBody<S>[src]
fn done(self) -> EncoderDone<S>
Returns EncoderDone object that might be passed back to the HTTP
protocol
Trait Implementations
impl<T: Io + AsRawFd> AsRawFd for RawBody<T>[src]
impl<S: Io> Write for RawBody<S>[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>1.0.0
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>1.0.0
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self1.0.0
Creates a "by reference" adaptor for this instance of Write. Read more