ok<T> static method

T ok<T>(
  1. Result<T, DbError> result,
  2. String what
)

result is Ok; answers its value.

Implementation

static T ok<T>(Result<T, DbError> result, String what) => result.when(
  ok: (value) => value,
  err: (error) => throw ConformanceFailure('$what: failed with $error'),
);