Trait dropshot::HttpResponse [−][src]
HttpResponse must produce a Result<Response<Body>, HttpError>
and generate
the response metadata. Typically one should use Response<Body>
or an
implementation of HttpTypedResponse
.
Required methods
fn to_result(self) -> Result<Response<Body>, HttpError>
[src]
Generate the response to the HTTP call.
fn metadata() -> ApiEndpointResponse
[src]
Extract status code and structure metadata for the non-error response. Type information for errors is handled generically across all endpoints.
Implementations on Foreign Types
impl HttpResponse for Response<Body>
[src]
Response<Body>
is used for free-form responses. The implementation of
to_result()
is trivial, and we don't have any typed metadata to return.
fn to_result(self) -> Result<Response<Body>, HttpError>
[src]
fn metadata() -> ApiEndpointResponse
[src]
Implementors
impl<T> HttpResponse for T where
T: HttpTypedResponse,
[src]
T: HttpTypedResponse,
Provide results and metadata generation for all implementing types.