guardAsyncResult<S> function
Async version of guardResult
Implementation
@pragma("vm:prefer-inline")
FutureResult<S, Object> guardAsyncResult<S>(
Future<Result<S, Object>> Function() func) async {
try {
return await func();
} catch (e) {
return Err(e);
}
}