[][src]Trait tide::IntoResponse

pub trait IntoResponse: Send + Sized {
    fn into_response(self) -> Response;

    fn with_status(self, status: StatusCode) -> WithStatus<Self> { ... }
}

Conversion into a Response.

Required methods

fn into_response(self) -> Response

Convert the value into a Response.

Loading content...

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);
Loading content...

Implementations on Foreign Types

impl IntoResponse for String[src]

impl<'_> IntoResponse for &'_ str[src]

Loading content...

Implementors

impl IntoResponse for Error[src]

impl IntoResponse for Response[src]

impl<State: Send + Sync + 'static> IntoResponse for Request<State>[src]

Loading content...