IntoResponse

Trait IntoResponse 

Source
pub trait IntoResponse {
    // Required method
    fn into_response(self) -> Response;
}
Available on crate feature server only.
Expand description

Convert an object into a Response

Required Methods§

Source

fn into_response(self) -> Response

Consume self and convert it into a Response

Implementations on Foreign Types§

Source§

impl IntoResponse for Infallible

Source§

impl IntoResponse for Error

Source§

impl IntoResponse for StatusCode

Source§

impl IntoResponse for Error

Available on crate feature query only.
Source§

impl IntoResponse for Error

Available on crate feature json only.
Source§

impl<B> IntoResponse for Response<B>
where B: Into<Body>,

Source§

impl<H, R> IntoResponse for (H, R)
where H: TryIntoResponseHeaders, R: IntoResponse,

Source§

impl<R, E> IntoResponse for Result<R, E>

Source§

impl<T> IntoResponse for (StatusCode, T)
where T: IntoResponse,

Implementors§

Source§

impl IntoResponse for ExtractBodyError

Source§

impl IntoResponse for GenericRejectionError

Source§

impl IntoResponse for PathParamsRejection

Source§

impl IntoResponse for WebSocketUpgradeRejectionError

Available on crate feature ws only.
Source§

impl IntoResponse for MultipartRejectionError

Available on crate feature multipart only.
Source§

impl IntoResponse for FileResponse

Source§

impl IntoResponse for Redirect

Source§

impl<S, E> IntoResponse for Sse<S>
where S: Stream<Item = Result<Event, E>> + Send + Sync + 'static, E: Into<BoxError>,

Source§

impl<T> IntoResponse for Form<T>
where T: Serialize,

Available on crate feature form only.
Source§

impl<T> IntoResponse for Json<T>
where T: Serialize,

Available on crate feature json only.
Source§

impl<T> IntoResponse for T
where T: TryInto<Body>, T::Error: IntoResponse,