Struct ntex::http::Response[][src]

pub struct Response<B = Body> { /* fields omitted */ }
Expand description

An HTTP Response

Implementations

Create http response builder with specific status.

Create http response builder

Constructs a response

Convert response to response with body

Constructs a response with body

Http message part of the response

Mutable reference to a http message part of the response

Get the response status code

Set the StatusCode for this response

Get the headers from the response

Get a mutable reference to the headers

Get an iterator for the cookies set by this response

Add a cookie to this response

Remove all cookies with the given name from this response. Returns the number of cookies removed.

Connection upgrade status

Keep-alive status for this connection

Responses extensions

Mutable reference to a the response’s extensions

Get body of this response

Set a body

Split response and body

Drop request’s body

Set a body and return previous body value

Extract response body

Trait Implementations

Get content encoding

Set content encoding

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Convert Response to a ResponseBuilder. Body get dropped.

Performs the conversion.

Performs the conversion.

Helper converters

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned.

The future response value.

Convert itself to AsyncResult or Error.

Override a status code for a Responder. Read more

Add header to the Responder’s response. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more