expect method

Future<T> expect(
  1. String msg
)

Unwraps a result, yielding the content of an Ok.

Throws an Exception if the value is an Err, with the passed message.

Implementation

Future<T> expect(String msg) => then((result) => result.expect(msg));