pub trait ResultExt<T> { // Required method fn status(self, status: StatusCode) -> Result<T, Error>; }
Extension trait for adding status codes to Results.
Map the error variant to an Error with the given status code.
Error