[−][src]Struct headers::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();
Implementations
impl TransferEncoding
[src]
pub fn chunked() -> TransferEncoding
[src]
Constructor for the most common Transfer-Encoding, chunked
.
pub fn is_chunked(&self) -> bool
[src]
Returns whether this ends with the chunked
encoding.
Trait Implementations
impl Clone for TransferEncoding
[src]
pub fn clone(&self) -> TransferEncoding
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TransferEncoding
[src]
impl Header for TransferEncoding
[src]
pub fn name() -> &'static HeaderName
[src]
pub fn decode<'i, I>(values: &mut I) -> Result<Self, Error> where
I: Iterator<Item = &'i HeaderValue>,
[src]
I: Iterator<Item = &'i HeaderValue>,
pub fn encode<E: Extend<HeaderValue>>(&self, values: &mut E)
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransferEncoding
[src]
impl Send for TransferEncoding
[src]
impl Sync for TransferEncoding
[src]
impl Unpin for TransferEncoding
[src]
impl UnwindSafe for TransferEncoding
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,