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