Struct 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.
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); encoding.apply(&mut res); let encoding = TransferEncoding::from_headers(res)?.unwrap(); assert_eq!(encoding, &Encoding::Chunked);
Implementations
Create a new instance from headers.
Get the HeaderName
.
Get the HeaderValue
.
Trait Implementations
Performs the conversion.
Performs the conversion.
type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
Converts this object to an iterator of resolved HeaderValues
.