Struct Response
struct Response<'headers, 'buf> { ... }
A parsed Response.
See Request docs for explanation of optional values.
Fields
version: Option<u8>The response minor version, such as
1forHTTP/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
impl<'h, 'b> Response<'h, 'b>
fn new(headers: &'h mut [Header<'b>]) -> Response<'h, 'b>Creates a new
Responseusing a slice ofHeaders you have allocated.fn parse(self: &mut Self, buf: &'b [u8]) -> Result<usize>Try to parse a buffer of bytes into this
Response.
impl<'headers, 'buf> Debug for Response<'headers, 'buf>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'headers, 'buf> Eq for Response<'headers, 'buf>
impl<'headers, 'buf> Freeze for Response<'headers, 'buf>
impl<'headers, 'buf> PartialEq for Response<'headers, 'buf>
fn eq(self: &Self, other: &Response<'headers, 'buf>) -> bool
impl<'headers, 'buf> RefUnwindSafe for Response<'headers, 'buf>
impl<'headers, 'buf> Send for Response<'headers, 'buf>
impl<'headers, 'buf> StructuralPartialEq for Response<'headers, 'buf>
impl<'headers, 'buf> Sync for Response<'headers, 'buf>
impl<'headers, 'buf> Unpin for Response<'headers, 'buf>
impl<'headers, 'buf> UnsafeUnpin for Response<'headers, 'buf>
impl<'headers, 'buf> UnwindSafe for Response<'headers, 'buf>
impl<T> Any for Response<'headers, 'buf>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Response<'headers, 'buf>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Response<'headers, 'buf>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Response<'headers, 'buf>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Response<'headers, 'buf>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Response<'headers, 'buf>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Response<'headers, 'buf>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>