Trait anyhow_http::response::FormatResponse
source · pub trait FormatResponse {
// Required methods
fn format_response(http_error: &HttpError) -> Bytes;
fn content_type() -> Mime;
}Expand description
Trait for formatting error responses.
Required Methods§
fn format_response(http_error: &HttpError) -> Bytes
fn content_type() -> Mime
Object Safety§
This trait is not object safe.
Implementors§
impl FormatResponse for Json
Available on crate feature
json only.