Enum hyper::http::h1::HttpWriter [] [src]

pub enum HttpWriter<W: Write> {
    ThroughWriter(W),
    ChunkedWriter(W),
    SizedWriter(W, u64),
    EmptyWriter(W),
}

Writers to handle different Transfer-Encodings.

Variants

A no-op Writer, used initially before Transfer-Encoding is determined.

A Writer for when Transfer-Encoding includes chunked.

A Writer for when Content-Length is set.

Enforces that the body is not longer than the Content-Length header.

A writer that should not write any body.

Methods

impl<W: Write> HttpWriter<W>
[src]

[src]

Unwraps the HttpWriter and returns the underlying Writer.

Important traits for &'a mut R
[src]

Access the inner Writer.

Important traits for &'a mut R
[src]

Access the inner Writer mutably.

Warning: You should not write to this directly, as you can corrupt the state.

[src]

Ends the HttpWriter, and returns the underlying Writer.

A final write_all() is called with an empty message, and then flushed. The ChunkedWriter variant will use this to write the 0-sized last-chunk.

Trait Implementations

impl<W: Write> Write for HttpWriter<W>
[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

Important traits for &'a mut R
1.0.0
[src]

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

impl<W: Write> Debug for HttpWriter<W>
[src]

[src]

Formats the value using the given formatter. Read more