pub trait IntoResponse {
// Required method
fn into_response(self) -> Response;
}Expand description
A trait for any type that can be turned into a Response
Required Methods§
Sourcefn into_response(self) -> Response
fn into_response(self) -> Response
Turn self into a Response
Implementations on Foreign Types§
Source§impl IntoResponse for Infallible
impl IntoResponse for Infallible
fn into_response(self) -> Response
Source§impl IntoResponse for Box<dyn Error>
impl IntoResponse for Box<dyn Error>
fn into_response(self) -> Response
Source§impl IntoResponse for Error
impl IntoResponse for Error
fn into_response(self) -> Response
Source§impl<B> IntoResponse for Response<B>where
B: IntoBody,
impl<B> IntoResponse for Response<B>where
B: IntoBody,
fn into_response(self) -> Response
Source§impl<R: IntoResponse, E: IntoResponse> IntoResponse for Result<R, E>
impl<R: IntoResponse, E: IntoResponse> IntoResponse for Result<R, E>
fn into_response(self) -> Response
Implementors§
impl IntoResponse for JsonBodyError
Available on crate feature
json only.