Skip to main content

IntoResponse

Trait IntoResponse 

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

Trait for types that can be converted into HTTP responses

Required Methods§

Source

fn into_response(self) -> Response

Convert self into an HTTP response

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 &str

Source§

impl IntoResponse for String

Source§

impl IntoResponse for Vec<u8>

Source§

impl IntoResponse for StatusCode

Source§

impl IntoResponse for Response

Source§

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

Implementors§