Struct headers_ext::TransferEncoding[][src]

pub struct TransferEncoding(_);

Transfer-Encoding header, defined in RFC7230

The Transfer-Encoding header field lists the transfer coding names corresponding to the sequence of transfer codings that have been (or will be) applied to the payload body in order to form the message body.

Note that setting this header will remove any previously set Content-Length header, in accordance with RFC7230:

A sender MUST NOT send a Content-Length header field in any message that contains a Transfer-Encoding header field.

ABNF

Transfer-Encoding = 1#transfer-coding

Example values

  • chunked
  • gzip, chunked

Example

use headers::TransferEncoding;

let transfer = TransferEncoding::chunked();

Methods

impl TransferEncoding
[src]

Constructor for the most common Transfer-Encoding, chunked.

Returns whether this ends with the chunked encoding.

Trait Implementations

impl Clone for TransferEncoding
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TransferEncoding
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations