[][src]Struct headers::TransferEncoding

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]

pub fn chunked() -> TransferEncoding[src]

Constructor for the most common Transfer-Encoding, chunked.

pub fn is_chunked(&self) -> bool[src]

Returns whether this ends with the chunked encoding.

Trait Implementations

impl Clone for TransferEncoding[src]

impl Debug for TransferEncoding[src]

impl Header for TransferEncoding[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self