Struct trillium_http_types::transfer::TransferEncoding[][src]

pub struct TransferEncoding { /* fields omitted */ }
Expand description

The form of encoding used to safely transfer the payload body to the user.

MDN Documentation

Specifications

Examples

use http_types::Response;
use http_types::transfer::{TransferEncoding, Encoding};
let mut encoding = TransferEncoding::new(Encoding::Chunked);

let mut res = Response::new(200);
res.insert_header(&encoding, &encoding);

let encoding = TransferEncoding::from_headers(res)?.unwrap();
assert_eq!(encoding, &Encoding::Chunked);

Implementations

Create a new instance of CacheControl.

Create a new instance from headers.

Access the encoding kind.

Trait Implementations

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Access the header’s name.

Access the header’s value.

Insert the header name and header value into something that looks like a Headers map. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.