Struct ferrum::response::Response [] [src]

pub struct Response {
    pub status: StatusCode,
    pub headers: Headers,
    pub body: Option<Body>,
    pub extensions: TypeMap<TypeMapInner>,
}

The response representation given to Middleware

Fields

The response status-code.

The headers of the response.

The body of the response.

A TypeMap to be used as an extensible storage for data associated with this Response.

Methods

impl Response
[src]

[src]

Construct a blank Response

[src]

Construct a redirect Response

[src]

Set the status and move the Response.

Useful for the "builder-style" pattern.

[src]

Set a header and move the Response.

Useful for the "builder-style" pattern.

[src]

Set the headers and move the Response.

Useful for the "builder-style" pattern.

[src]

Set the body and move the Response.

Useful for the "builder-style" pattern.

[src]

Set the content and move the Response.

Useful for the "builder-style" pattern.

[src]

Set the content.

[src]

Set the content-type mime and move the Response.

Useful for the "builder-style" pattern.

[src]

Set the content-type mime.

Trait Implementations

impl From<HyperResponse> for Response
[src]

[src]

Performs the conversion.

impl Debug for Response
[src]

[src]

Formats the value using the given formatter.

impl Display for Response
[src]

[src]

Formats the value using the given formatter. Read more

impl Extensible<TypeMapInner> for Response
[src]

[src]

Get a reference to the type's extension storage.

[src]

Get a mutable reference to the type's extension storage.

impl Plugin for Response
[src]

[src]

Return a copy of the plugin's produced value. Read more

[src]

Return a reference to the plugin's produced value. Read more

[src]

Return a mutable reference to the plugin's produced value. Read more

[src]

Create and evaluate a once-off instance of a plugin.