IntoResponse

Trait IntoResponse 

Source
pub trait IntoResponse {
    // Required method
    fn into_response(self) -> Response<Full<Bytes>>;
}
Expand description

Trait for types that can be converted into an HTTP response

Required Methods§

Source

fn into_response(self) -> Response<Full<Bytes>>

Convert self into a Response

Implementations on Foreign Types§

Source§

impl IntoResponse for &'static str

Source§

impl IntoResponse for ()

Source§

impl IntoResponse for String

Source§

impl IntoResponse for Response<Full<Bytes>>

Source§

impl IntoResponse for StatusCode

Source§

impl<R> IntoResponse for (StatusCode, HeaderMap, R)
where R: IntoResponse,

Source§

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

Source§

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

Implementors§

Source§

impl IntoResponse for ApiError

Source§

impl IntoResponse for NoContent

Source§

impl IntoResponse for Redirect

Source§

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

Source§

impl<S, E> IntoResponse for StreamBody<S>
where S: Stream<Item = Result<Bytes, E>> + Send + 'static, E: Error + Send + Sync + 'static,

Source§

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

Source§

impl<T> IntoResponse for Html<T>
where T: Into<String>,

Source§

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

Source§

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

Source§

impl<T, const CODE: u16> IntoResponse for WithStatus<T, CODE>
where T: IntoResponse,