Trait actix_proxy::IntoHttpResponse
source · 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§
sourcefn into_http_response(self) -> HttpResponse
fn into_http_response(self) -> HttpResponse
Creates a HttpResponse
from self
.
Provided Methods§
sourcefn into_wrapped_http_response<E>(self) -> Result<HttpResponse, E>where
Self: Sized,
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
.