[−][src]Trait tide::IntoResponse
Conversion 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);