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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl FormatResponse for Json
Available on crate feature
json only.