Struct httparse::Response[][src]

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

Creates a new Response using a slice of Headers you have allocated.

Try to parse a buffer of bytes into this Response.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.