Namespace: FsToolkit.ErrorHandling
Transforms a Task<'T> into an Async<Result<'T, 'Error>>.
Task<'T> -> Async<Result<'T, 'Error>>let result = AsyncResult.ofTask (Task.FromResult 42)
// async { return Ok 42 }let result = AsyncResult.ofTask (Task.FromException (System.Exception("Boom!")))
// async { return Error (System.Exception("Boom!")) }