pub struct Response<'headers, 'buf> {
pub version: Option<u8>,
pub code: Option<u16>,
pub reason: Option<&'buf str>,
pub headers: &'headers mut [Header<'buf>],
}
Expand description
A parsed Response.
See Request
docs for explanation of optional values.
Fields§
§version: Option<u8>
The response minor version, such as 1
for HTTP/1.1
.
code: Option<u16>
The response code, such as 200
.
reason: Option<&'buf str>
The response reason-phrase, such as OK
.
Contains an empty string if the reason-phrase was missing or contained invalid characters.
headers: &'headers mut [Header<'buf>]
The response headers.
Implementations§
Trait Implementations§
impl<'headers, 'buf> Eq for Response<'headers, 'buf>
impl<'headers, 'buf> StructuralPartialEq for Response<'headers, 'buf>
Auto Trait Implementations§
impl<'headers, 'buf> Freeze for Response<'headers, 'buf>
impl<'headers, 'buf> RefUnwindSafe for Response<'headers, 'buf>
impl<'headers, 'buf> Send for Response<'headers, 'buf>
impl<'headers, 'buf> Sync for Response<'headers, 'buf>
impl<'headers, 'buf> Unpin for Response<'headers, 'buf>
impl<'headers, 'buf> !UnwindSafe for Response<'headers, 'buf>
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