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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 40 bytes