Trait ErrGettable
Source pub trait ErrGettable {
type Res;
// Required method
fn get_err(self) -> Self::Res;
}
Safely unwraps a Result, yielding the content of an Err
.
§Examples
let x: Rresult<u32, &str> = Ok(2);
x.get_err();
let x: Rresult<u32, &str> = Err("emergency failure");
assert_eq!(x.get_err(), "emergency failure");