Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 324 Bytes

File metadata and controls

20 lines (13 loc) · 324 Bytes

AsyncResult.ofAsync

Namespace: FsToolkit.ErrorHandling

Transforms a Async<'T> into an Async<Result<'T, 'Error>>.

Function Signature

Async<'T> -> Async<Result<'T, 'Error>>

Examples

Example 1

let result = AsyncResult.ofAsync (async { return 42 })
// async { return Ok 42 }