toOk<E extends Object> method

Ok<S, E> toOk<E extends Object>()

Convert the object to a Result type Ok.

Implementation

@pragma("vm:prefer-inline")
Ok<S, E> toOk<E extends Object>() {
  assert(this is! Result,
      'Don\'t use the "toOk()" method on instances of Result.');
  return Ok(this);
}