fromFuture<T, E> static method
Implementation
static ResultAsync<T, E> fromFuture<T, E>(
Future<T> future, E Function(Object e) errorFn) {
final newFuture = future
.then<Result<T, E>>((value) => Ok<T, E>(value))
.catchError((e) => Err<T, E>(errorFn(e)));
return ResultAsync(newFuture);
}