| 70 | // implemented for failure), but the or_err() name better expresses the intention so its kept around. |
| 71 | |
| 72 | pub trait OptionExt<T> { |
| 73 | fn or_err<D>(self, context: D) -> Result<T> |
| 74 | where |
| 75 | D: Display + Send + Sync + 'static; |
| 76 | |
| 77 | fn required(self) -> Result<T>; |
| 78 | } |
| 79 | |
| 80 | impl<T> OptionExt<T> for Option<T> { |
| 81 | fn or_err<D>(self, context: D) -> Result<T> |
nothing calls this directly
no outgoing calls
no test coverage detected