pub trait UnwrapOrErr<T> {
// Required method
fn unwrap_or_err(self) -> T;
}Expand description
Returns the Ok value or the Err value. Available when the Ok and Err types are the same. This is a way to default the result using the specific Err value rather than unwrap_or_default() using Ok’s default.