tryEitherAsync<T> function
Implementation
AsyncResult<T> tryEitherAsync<T>(
FutureOr<T> Function(BindEither bind) block,
) async {
A bind<A>(Result<A> either) => either.fold((e) => throw e, identity);
try {
return Either.right(await block(bind));
} on Exception catch (e) {
return Either.left(e);
}
}