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]
impl TransferEncoding
pub fn chunked() -> TransferEncoding
[src]
pub fn chunked() -> TransferEncoding
Constructor for the most common Transfer-Encoding, chunked
.
pub fn is_chunked(&self) -> bool
[src]
pub fn is_chunked(&self) -> bool
Returns whether this ends with the chunked
encoding.
Trait Implementations
impl Clone for TransferEncoding
[src]
impl Clone for TransferEncoding
fn clone(&self) -> TransferEncoding
[src]
fn clone(&self) -> TransferEncoding
Returns 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 TransferEncoding
Auto Trait Implementations
impl Send for TransferEncoding
impl Send for TransferEncoding
impl Sync for TransferEncoding
impl Sync for TransferEncoding