pub trait ApiErrorExt:
Error
+ Sized
+ Send
+ Sync
+ 'static {
// Provided method
fn into_response_with_code(self, code: StatusCode) -> Response { ... }
}
Expand description
Method to convert an std::error::Error
into a Response
with a
specified StatusCode
Provided Methods§
Sourcefn into_response_with_code(self, code: StatusCode) -> Response
fn into_response_with_code(self, code: StatusCode) -> Response
Consume the error and convert it to a Response
with the specified
StatusCode
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.