pub struct Response<'headers, 'buf: 'headers> {
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 version, such as 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
sourceimpl<'headers, 'buf: 'headers> PartialEq<Response<'headers, 'buf>> for Response<'headers, 'buf>
impl<'headers, 'buf: 'headers> PartialEq<Response<'headers, 'buf>> for Response<'headers, 'buf>
impl<'headers, 'buf: 'headers> Eq for Response<'headers, 'buf>
impl<'headers, 'buf: 'headers> StructuralEq for Response<'headers, 'buf>
impl<'headers, 'buf: 'headers> StructuralPartialEq for Response<'headers, 'buf>
Auto Trait Implementations
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> where
'buf: 'headers,
impl<'headers, 'buf> !UnwindSafe for Response<'headers, 'buf>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more