pub struct Headers { /* private fields */ }Expand description
A received header block (request or response headers, or trailers).
Pseudo-header fields are reached through Headers::method, Headers::path and so on;
Headers::iter yields the regular fields in order. Names are lower case.
Implementations§
Source§impl Headers
impl Headers
:authority (when absent, a host field may carry the authority: see Headers::get).
Sourcepub fn protocol(&self) -> Option<&[u8]>
pub fn protocol(&self) -> Option<&[u8]>
:protocol of an extended CONNECT request (RFC 8441), for example websocket; only
accepted when crate::Config::enable_connect_protocol is set.
Sourcepub fn content_length(&self) -> Option<u64>
pub fn content_length(&self) -> Option<u64>
The content-length value, when present.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Headers
impl Freeze for Headers
impl Move for Headers
impl RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl UnsafeUnpin for Headers
impl UnwindSafe for Headers
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