Convert the object to a Result type Err.
Err<S, E> toErr<S>() { assert(this is! Result, 'Don\'t use the "toErr()" method on instances of Result.'); return Err(this); }