Trait rama::http::IntoResponse

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

Trait for generating responses.

Types that implement IntoResponse can be returned from handlers.

§Implementing IntoResponse

You generally shouldn’t have to implement IntoResponse manually, as rama provides implementations for many common types.

Required Methods§

fn into_response(self) -> Response<Body>

Create a response.

Implementations on Foreign Types§

§

impl IntoResponse for &'static str

§

impl IntoResponse for &'static [u8]

§

impl IntoResponse for Cow<'static, str>

§

impl IntoResponse for Cow<'static, [u8]>

§

impl IntoResponse for Infallible

§

impl IntoResponse for ()

§

impl IntoResponse for Box<str>

§

impl IntoResponse for Box<[u8]>

§

impl IntoResponse for String

§

impl IntoResponse for Vec<u8>

§

impl IntoResponse for Bytes

§

impl IntoResponse for BytesMut

§

impl<K, V, const N: usize> IntoResponse for [(K, V); N]

§

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

§

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

§

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

§

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

§

impl<R, T1> IntoResponse for (Parts, T1, R)

§

impl<R, T1> IntoResponse for (Response<()>, T1, R)

§

impl<R, T1> IntoResponse for (StatusCode, T1, R)

§

impl<R, T1> IntoResponse for (T1, R)

§

impl<R, T1, T2> IntoResponse for (Parts, T1, T2, R)

§

impl<R, T1, T2> IntoResponse for (Response<()>, T1, T2, R)

§

impl<R, T1, T2> IntoResponse for (StatusCode, T1, T2, R)

§

impl<R, T1, T2> IntoResponse for (T1, T2, R)

§

impl<R, T1, T2, T3> IntoResponse for (Parts, T1, T2, T3, R)

§

impl<R, T1, T2, T3> IntoResponse for (Response<()>, T1, T2, T3, R)

§

impl<R, T1, T2, T3> IntoResponse for (StatusCode, T1, T2, T3, R)

§

impl<R, T1, T2, T3> IntoResponse for (T1, T2, T3, R)

§

impl<R, T1, T2, T3, T4> IntoResponse for (Parts, T1, T2, T3, T4, R)

§

impl<R, T1, T2, T3, T4> IntoResponse for (Response<()>, T1, T2, T3, T4, R)

§

impl<R, T1, T2, T3, T4> IntoResponse for (StatusCode, T1, T2, T3, T4, R)

§

impl<R, T1, T2, T3, T4> IntoResponse for (T1, T2, T3, T4, R)

§

impl<R, T1, T2, T3, T4, T5> IntoResponse for (Parts, T1, T2, T3, T4, T5, R)

§

impl<R, T1, T2, T3, T4, T5> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, R)

§

impl<R, T1, T2, T3, T4, T5> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, R)

§

impl<R, T1, T2, T3, T4, T5> IntoResponse for (T1, T2, T3, T4, T5, R)

§

impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, R)

§

impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, R)

§

impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, R)

§

impl<R, T1, T2, T3, T4, T5, T6> IntoResponse for (T1, T2, T3, T4, T5, T6, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, T7, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, T7, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, T7, T8, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, T7, T8, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, T7, T8, T9, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, T7, T8, T9, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, T9, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, T9, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponse for (Parts, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponse for (Response<()>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponse for (StatusCode, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R)

§

impl<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponse for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R)

§

impl<T> IntoResponse for Result<T, ErrorResponse>
where T: IntoResponse,

§

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

§

impl<T, U> IntoResponse for Chain<T, U>
where T: Buf + Unpin + Send + Sync + 'static, U: Buf + Unpin + Send + Sync + 'static,

§

impl<const N: usize> IntoResponse for &'static [u8; N]

§

impl<const N: usize> IntoResponse for [u8; N]

Implementors§

§

impl IntoResponse for Parts

§

impl IntoResponse for Extensions

§

impl IntoResponse for UriParamsDeserializeError

§

impl IntoResponse for Redirect

§

impl IntoResponse for TypedHeaderRejection

§

impl IntoResponse for Body

§

impl IntoResponse for HeaderMap

§

impl IntoResponse for StatusCode

§

impl<B> IntoResponse for Response<B>
where B: Body<Data = Bytes> + Send + Sync + 'static, <B as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

§

impl<I, K, V> IntoResponse for AppendHeaders<I>

§

impl<K, V> IntoResponse for TryIntoHeaderError<K, V>
where K: Display, V: Display,

§

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

§

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

§

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