pub trait IntoResponse {
// Required method
fn into_response(self) -> Response<Body>;
}Expand description
Trait for generating an HTTP response.
Required Methods§
Sourcefn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Convert the type into a Response<Body>.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl IntoResponse for &'static [u8]
impl IntoResponse for &'static [u8]
fn into_response(self) -> Response<Body>
Source§impl IntoResponse for &'static str
impl IntoResponse for &'static str
fn into_response(self) -> Response<Body>
Source§impl IntoResponse for ()
impl IntoResponse for ()
fn into_response(self) -> Response<Body>
Source§impl IntoResponse for Infallible
impl IntoResponse for Infallible
fn into_response(self) -> Response<Body>
Source§impl IntoResponse for String
impl IntoResponse for String
fn into_response(self) -> Response<Body>
Source§impl IntoResponse for Vec<u8>
impl IntoResponse for Vec<u8>
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
T8: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
T8: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
T8: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
T8: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
T7: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (T1, T2, T3, T4, T5, T6, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (T1, T2, T3, T4, T5, T6, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
T6: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4, T5> IntoResponse for (T1, T2, T3, T4, T5, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
impl<R, T1, T2, T3, T4, T5> IntoResponse for (T1, T2, T3, T4, T5, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
T5: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4> IntoResponse for (StatusCode, T1, T2, T3, T4, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
impl<R, T1, T2, T3, T4> IntoResponse for (StatusCode, T1, T2, T3, T4, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3, T4> IntoResponse for (T1, T2, T3, T4, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
impl<R, T1, T2, T3, T4> IntoResponse for (T1, T2, T3, T4, R)where
R: IntoResponse,
T1: IntoResponseParts,
T2: IntoResponseParts,
T3: IntoResponseParts,
T4: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3> IntoResponse for (StatusCode, T1, T2, T3, R)
impl<R, T1, T2, T3> IntoResponse for (StatusCode, T1, T2, T3, R)
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2, T3> IntoResponse for (T1, T2, T3, R)
impl<R, T1, T2, T3> IntoResponse for (T1, T2, T3, R)
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2> IntoResponse for (StatusCode, T1, T2, R)
impl<R, T1, T2> IntoResponse for (StatusCode, T1, T2, R)
fn into_response(self) -> Response<Body>
Source§impl<R, T1, T2> IntoResponse for (T1, T2, R)
impl<R, T1, T2> IntoResponse for (T1, T2, R)
fn into_response(self) -> Response<Body>
Source§impl<R, T1> IntoResponse for (StatusCode, T1, R)where
R: IntoResponse,
T1: IntoResponseParts,
impl<R, T1> IntoResponse for (StatusCode, T1, R)where
R: IntoResponse,
T1: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R, T1> IntoResponse for (T1, R)where
R: IntoResponse,
T1: IntoResponseParts,
impl<R, T1> IntoResponse for (T1, R)where
R: IntoResponse,
T1: IntoResponseParts,
fn into_response(self) -> Response<Body>
Source§impl<R> IntoResponse for (StatusCode, R)where
R: IntoResponse,
impl<R> IntoResponse for (StatusCode, R)where
R: IntoResponse,
fn into_response(self) -> Response<Body>
Source§impl<T, E> IntoResponse for Result<T, E>where
T: IntoResponse,
E: IntoResponse,
impl<T, E> IntoResponse for Result<T, E>where
T: IntoResponse,
E: IntoResponse,
fn into_response(self) -> Response<Body>
Implementors§
impl IntoResponse for Error
impl IntoResponse for Redirect
impl IntoResponse for Response<Body>
impl IntoResponse for Response<Full<Bytes>>
impl IntoResponse for StatusCode
impl<S, E> IntoResponse for Sse<S>
impl<T> IntoResponse for Html<T>
impl<T> IntoResponse for Json<T>where
T: Serialize,
Available on crate feature
json only.