pub struct Response<'b, 'h> {
pub version: Version,
pub status: u16,
pub reason: &'b [u8],
pub headers: &'h [Header<'b>],
pub framing: Framing,
pub keep_alive: bool,
pub upgraded: bool,
pub head_len: usize,
}Expand description
A parsed response head.
Fields§
§version: VersionThe version.
status: u16The status code, 100 to 599.
reason: &'b [u8]The reason phrase (possibly empty).
headers: &'h [Header<'b>]All header fields in order.
framing: FramingHow the body is delimited, given the request method.
keep_alive: boolWhether the connection may be reused.
upgraded: boolThe connection now carries another protocol: 101 Switching Protocols, or a 2xx reply
to CONNECT (a tunnel).
head_len: usizeBytes taken by the head.
Implementations§
Trait Implementations§
impl<'b, 'h> Copy for Response<'b, 'h>
impl<'b, 'h> Eq for Response<'b, 'h>
impl<'b, 'h> StructuralPartialEq for Response<'b, 'h>
Auto Trait Implementations§
impl<'b, 'h> Forget for Response<'b, 'h>
impl<'b, 'h> Freeze for Response<'b, 'h>
impl<'b, 'h> Move for Response<'b, 'h>
impl<'b, 'h> RefUnwindSafe for Response<'b, 'h>
impl<'b, 'h> Send for Response<'b, 'h>
impl<'b, 'h> Sync for Response<'b, 'h>
impl<'b, 'h> Unpin for Response<'b, 'h>
impl<'b, 'h> UnsafeUnpin for Response<'b, 'h>
impl<'b, 'h> UnwindSafe for Response<'b, 'h>
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