pub type HttpResponse = Response<Body>;
Expand description
HTTP response.
Aliased Type§
struct HttpResponse { /* private fields */ }
Trait Implementations§
Source§impl From<&EventError> for HttpResponse
impl From<&EventError> for HttpResponse
Source§fn from(err: &EventError) -> HttpResponse
fn from(err: &EventError) -> HttpResponse
Build a client-facing HttpResponse
appropriate for the error that occurred.
This function will set the appropriate HTTP status code (400 or 500) depending on whether the
error is internal (500) or caused by the client (400). For client errors, the
response body contains a human-readable description of the error and the Content-Type
response header is set to text/plain
. For internal errors, no response body is returned to
the client.
Source§impl From<EventError> for HttpResponse
impl From<EventError> for HttpResponse
Source§fn from(err: EventError) -> HttpResponse
fn from(err: EventError) -> HttpResponse
Converts to this type from the input type.