Logo MVUish.Avalonia

OfAsyncWith Module

Functions and values

Function or value Description

attempt start f arg ofError dispatch onError

Full Usage: attempt start f arg ofError dispatch onError

Parameters:
    start : Async<unit> -> unit
    f : 'Arg -> Async<unit>
    arg : 'Arg
    ofError : exn -> 'Msg
    dispatch : Dispatch<'Msg>
    onError : string * exn -> unit

Modifiers: inline
Type parameters: 'Arg, 'Msg

Run an async workload with a custom start function for its effect. Only an exception produces a message.

start : Async<unit> -> unit
f : 'Arg -> Async<unit>
arg : 'Arg
ofError : exn -> 'Msg
dispatch : Dispatch<'Msg>
onError : string * exn -> unit

either start f arg ofSuccess ofError dispatch onError

Full Usage: either start f arg ofSuccess ofError dispatch onError

Parameters:
    start : Async<unit> -> unit
    f : 'Arg -> Async<'Result>
    arg : 'Arg
    ofSuccess : 'Result -> 'Msg
    ofError : exn -> 'Msg
    dispatch : Dispatch<'Msg>
    onError : string * exn -> unit

Modifiers: inline
Type parameters: 'Arg, 'Result, 'Msg

Run an async workload with a custom start function and map success or exception into messages.

start : Async<unit> -> unit
f : 'Arg -> Async<'Result>
arg : 'Arg
ofSuccess : 'Result -> 'Msg
ofError : exn -> 'Msg
dispatch : Dispatch<'Msg>
onError : string * exn -> unit

perform start f arg ofSuccess dispatch onError

Full Usage: perform start f arg ofSuccess dispatch onError

Parameters:
    start : Async<unit> -> unit
    f : 'Arg -> Async<'Result>
    arg : 'Arg
    ofSuccess : 'Result -> 'Msg
    dispatch : Dispatch<'Msg>
    onError : string * exn -> unit

Modifiers: inline
Type parameters: 'Arg, 'Result, 'Msg

Run an async workload with a custom start function and dispatch its result. An exception is reported to the error handler. Use 'Async.Start' here to migrate from Elmish's thread-pool OfAsync.

start : Async<unit> -> unit
f : 'Arg -> Async<'Result>
arg : 'Arg
ofSuccess : 'Result -> 'Msg
dispatch : Dispatch<'Msg>
onError : string * exn -> unit

Type something to start searching.