Struct headers::common::transfer_encoding::TransferEncoding
source · pub struct TransferEncoding(FlatCsv);
Expand description
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();
Tuple Fields§
§0: FlatCsv
Implementations§
source§impl TransferEncoding
impl TransferEncoding
sourcepub fn chunked() -> TransferEncoding
pub fn chunked() -> TransferEncoding
Constructor for the most common Transfer-Encoding, chunked
.
sourcepub fn is_chunked(&self) -> bool
pub fn is_chunked(&self) -> bool
Returns whether this ends with the chunked
encoding.
Trait Implementations§
source§impl Clone for TransferEncoding
impl Clone for TransferEncoding
source§fn clone(&self) -> TransferEncoding
fn clone(&self) -> TransferEncoding
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransferEncoding
impl Debug for TransferEncoding
Auto Trait Implementations§
impl !Freeze for TransferEncoding
impl RefUnwindSafe for TransferEncoding
impl Send for TransferEncoding
impl Sync for TransferEncoding
impl Unpin for TransferEncoding
impl UnwindSafe for TransferEncoding
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)