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> RawBody<S>
[src]

Returns EncoderDone object that might be passed back to the HTTP protocol

Trait Implementations

impl<T: Destination> Destination for RawBody<T>
[src]

This method does the actual sendfile call Read more

Test whether this socket is ready to be written to or not. Read more

impl<S: AsyncWrite> Write for RawBody<S>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more

impl<S: AsyncWrite> AsyncWrite for RawBody<S>
[src]

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more

Write a Buf into this value, returning how many bytes were written. Read more