pub trait ResultExt<T> {
// Required method
fn status(self, status: StatusCode) -> Result<T>;
}Expand description
Extension trait for Result and Option to set HTTP status code on error.
Required Methods§
Sourcefn status(self, status: StatusCode) -> Result<T>
fn status(self, status: StatusCode) -> Result<T>
Set the HTTP status code for this error.