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]

[src]

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

Trait Implementations

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

[src]

This method does the actual sendfile call Read more

[src]

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

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

[src]

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

[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

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

[src]

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

[src]

Attempt to write bytes from buf into the object. Read more

[src]

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more

[src]

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

Auto Trait Implementations

impl<S> Send for RawBody<S> where
    S: Send

impl<S> Sync for RawBody<S> where
    S: Send