Trait fire_http_api::error::ApiError
source · pub trait ApiError: Debug + Display + Serialize {
// Required methods
fn internal<E: Error>(error: E) -> Self;
fn request<E: Error>(error: E) -> Self;
fn status_code(&self) -> StatusCode;
}Expand description
The error that is sent if something goes wrong while responding to a request.
§Panics
If deserialization or serialization failes this will result in a panic
Required Methods§
fn internal<E: Error>(error: E) -> Self
fn request<E: Error>(error: E) -> Self
fn status_code(&self) -> StatusCode
Object Safety§
This trait is not object safe.