pub struct TransferEncoding { /* private fields */ }
Expand description
The form of encoding used to safely transfer the payload body to the user.
§Specifications
§Examples
use http_types_rs::Response;
use http_types_rs::transfer::{TransferEncoding, Encoding};
let mut encoding = TransferEncoding::new(Encoding::Chunked);
let mut res = Response::new(200);
res.insert_header(&encoding, &encoding);
let encoding = TransferEncoding::from_headers(res)?.unwrap();
assert_eq!(encoding, &Encoding::Chunked);
Implementations§
Trait Implementations§
Source§impl Debug for TransferEncoding
impl Debug for TransferEncoding
Source§impl Deref for TransferEncoding
impl Deref for TransferEncoding
Source§impl DerefMut for TransferEncoding
impl DerefMut for TransferEncoding
Source§impl From<&Encoding> for TransferEncoding
impl From<&Encoding> for TransferEncoding
Source§impl From<&EncodingProposal> for TransferEncoding
impl From<&EncodingProposal> for TransferEncoding
Source§fn from(encoding: &EncodingProposal) -> Self
fn from(encoding: &EncodingProposal) -> Self
Converts to this type from the input type.
Source§impl From<Encoding> for TransferEncoding
impl From<Encoding> for TransferEncoding
Source§impl From<EncodingProposal> for TransferEncoding
impl From<EncodingProposal> for TransferEncoding
Source§fn from(encoding: EncodingProposal) -> Self
fn from(encoding: EncodingProposal) -> Self
Converts to this type from the input type.
Source§impl Header for TransferEncoding
impl Header for TransferEncoding
Source§fn header_name(&self) -> HeaderName
fn header_name(&self) -> HeaderName
Access the header’s name.
Source§fn header_value(&self) -> HeaderValue
fn header_value(&self) -> HeaderValue
Access the header’s value.
Source§impl PartialEq<&Encoding> for TransferEncoding
impl PartialEq<&Encoding> for TransferEncoding
Source§impl PartialEq<Encoding> for TransferEncoding
impl PartialEq<Encoding> 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> ToHeaderValues for Twhere
T: Header,
impl<T> ToHeaderValues for Twhere
T: Header,
Source§type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
Source§fn to_header_values(&self) -> Result<<T as ToHeaderValues>::Iter, Error>
fn to_header_values(&self) -> Result<<T as ToHeaderValues>::Iter, Error>
Converts this object to an iterator of resolved
HeaderValues
.