error<T, E> static method

Result<T, E> error<T, E>(
  1. E err
)

Implementation

static Result<T, E> error<T, E>(E err) {
  return Result._(
      ok: _Ok<T>(),
      error: _Error<E>(val: err),
      type: ResultType.error,
      rawValue: err);
}