pub trait AddStatusCode<T, E>: Into<Result<T, E>>{
// Provided method
fn status_code(self, status_code: StatusCode) -> Result<T> { ... }
}Expand description
Convenience trait to convert Result into serror::Result by adding status to the inner error, if it exists.
Provided Methods§
fn status_code(self, status_code: StatusCode) -> Result<T>
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.