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
chunkedgzip, chunked
Example
use headers::TransferEncoding; let transfer = TransferEncoding::chunked();
Methods
impl TransferEncoding[src]
impl TransferEncodingpub fn chunked() -> TransferEncoding[src]
pub fn chunked() -> TransferEncodingConstructor for the most common Transfer-Encoding, chunked.
pub fn is_chunked(&self) -> bool[src]
pub fn is_chunked(&self) -> boolReturns whether this ends with the chunked encoding.
Trait Implementations
impl Clone for TransferEncoding[src]
impl Clone for TransferEncodingfn clone(&self) -> TransferEncoding[src]
fn clone(&self) -> TransferEncodingReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for TransferEncoding[src]
impl Debug for TransferEncodingAuto Trait Implementations
impl Send for TransferEncoding
impl Send for TransferEncodingimpl Sync for TransferEncoding
impl Sync for TransferEncoding