Struct actix_web::HttpResponse [] [src]

pub struct HttpResponse {
    pub version: Option<Version>,
    pub headers: HeaderMap,
    pub status: StatusCode,
    // some fields omitted
}

An HTTP Response

Fields

Methods

impl HttpResponse
[src]

[src]

[src]

Constructs a response

[src]

Constructs a response from error

[src]

The error which is responsible for this response

[src]

Get the HTTP version of this response.

[src]

Get the headers from the response.

[src]

Get a mutable reference to the headers.

[src]

Get the status from the server.

[src]

Set the StatusCode for this response.

[src]

Get custom reason for the response.

[src]

Set the custom reason for the response.

[src]

Set connection type

[src]

Connection upgrade status

[src]

Keep-alive status for this connection

[src]

is chunked encoding enabled

[src]

Enables automatic chunked transfer encoding

[src]

Get body os this response

[src]

Set a body

[src]

Set a body and return previous body value

Trait Implementations

impl From<ParseError> for HttpResponse
[src]

Return BadRequest for ParseError

[src]

Performs the conversion.

impl From<HttpError> for HttpResponse
[src]

Return InternalServerError for HttpError, Response generation can return HttpError, so it is internal error

[src]

Performs the conversion.

impl From<ParseError> for HttpResponse
[src]

Return BadRequest for cookie::ParseError

[src]

Performs the conversion.

impl From<MultipartError> for HttpResponse
[src]

Return BadRequest for MultipartError

[src]

Performs the conversion.

impl From<HttpRangeParseError> for HttpResponse
[src]

Return BadRequest for HttpRangeParseError

[src]

Performs the conversion.

impl Debug for HttpResponse
[src]

[src]

Formats the value using the given formatter.

impl<I: Into<HttpResponse>, E: Into<HttpResponse>> From<Result<I, E>> for HttpResponse
[src]

Helper conversion implementation

[src]

Performs the conversion.

impl From<StaticResponse> for HttpResponse
[src]

[src]

Performs the conversion.