[−][src]Trait tide::IntoResponse
A value that is synchronously convertable into a Response
.
Required methods
fn into_response(self) -> Response
Convert the value into a Response
.
Provided methods
fn with_status(self, status: StatusCode) -> WithStatus<Self>
Create a new IntoResponse
value that will respond with the given status code.
let resp = "Hello, 404!".with_status(http::status::StatusCode::NOT_FOUND).into_response(); assert_eq!(resp.status(), http::status::StatusCode::NOT_FOUND);
Implementations on Foreign Types
impl IntoResponse for ()
[src]
impl IntoResponse for ()
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl IntoResponse for Vec<u8>
[src]
impl IntoResponse for Vec<u8>
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl IntoResponse for String
[src]
impl IntoResponse for String
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl<'_> IntoResponse for &'_ str
[src]
impl<'_> IntoResponse for &'_ str
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl IntoResponse for StatusCode
[src]
impl IntoResponse for StatusCode
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl<T: IntoResponse, U: IntoResponse> IntoResponse for Result<T, U>
[src]
impl<T: IntoResponse, U: IntoResponse> IntoResponse for Result<T, U>
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl<T: Send + Into<Body>> IntoResponse for Response<T>
[src]
impl<T: Send + Into<Body>> IntoResponse for Response<T>
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
Implementors
impl IntoResponse for Bytes
[src]
impl IntoResponse for Bytes
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl<T: 'static + Send + Serialize> IntoResponse for Form<T>
[src]
impl<T: 'static + Send + Serialize> IntoResponse for Form<T>
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |
impl<T: Send + Serialize> IntoResponse for Json<T>
[src]
impl<T: Send + Serialize> IntoResponse for Json<T>
fn into_response(self) -> Response | [src] |
fn with_status(self, status: StatusCode) -> WithStatus<Self> | [src] |