pub trait ErrorResponseExt {
// Required methods
fn to_error_response(&self) -> ErrorResponse;
fn status_code(&self) -> StatusCode;
}Expand description
Extension trait for consistent error formatting
Required Methods§
Sourcefn to_error_response(&self) -> ErrorResponse
fn to_error_response(&self) -> ErrorResponse
Convert to standardized error response
Sourcefn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Get the appropriate HTTP status code
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".