pub trait IntoHttpResponse {
    // Required method
    fn into_http_response(self) -> HttpResponse;

    // Provided method
    fn into_wrapped_http_response<E>(self) -> Result<HttpResponse, E>
       where Self: Sized { ... }
}
Expand description

Trait for converting a ClientResponse into a HttpResponse.

You can implement this trait on your types, of course, but its main goal is to enable ClientResponse as return value in impl Responder contexts.

Required Methods§

source

fn into_http_response(self) -> HttpResponse

Creates a HttpResponse from self.

Provided Methods§

source

fn into_wrapped_http_response<E>(self) -> Result<HttpResponse, E>where Self: Sized,

Wraps the HttpResponse created by into_http_response in a Result.

Errors

Because into_http_response is infallible, this method is, too. So calling this method never fails and never returns an Err.

Implementations on Foreign Types§

source§

impl IntoHttpResponse for ClientResponse<Decompress<Payload>>

Implementors§