toResult method

Future<AsyncResult<T>> toResult()

Implementation

Future<AsyncResult<T>> toResult() async {
  try {
    return AsyncResult.success(await this);
  } catch (e, stackTrace) {
    return AsyncResult.failure(e, stackTrace);
  }
}