pub trait IntoResponse {
    type Err: Into<HandlerError> + Send + Sync + 'static;
    fn into_response(self) -> BoxFuture<'static, Result<Response, Self::Err>>;

    fn accepted_types() -> Option<Vec<Mime>> { ... }
}
Expand description

This trait needs to be implemented by every type returned from an endpoint to to provide the response.

Associated Types

Required methods

Turn this into a response that can be returned to the browser. This api will likely change in the future.

Provided methods

Return a list of supported mime types.

Implementations on Foreign Types

Implementors