Logo MVUish.Avalonia

OfTask Module

Functions and values

Function or value Description

attempt f arg ofError dispatch onError

Full Usage: attempt f arg ofError dispatch onError

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

Modifiers: inline
Type parameters: 'Arg, 'Msg

Run a task for its effect. Only an exception produces a message.

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

either f arg ofSuccess ofError dispatch onError

Full Usage: either f arg ofSuccess ofError dispatch onError

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

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

Run a task and map success or exception into messages.

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

perform f arg ofSuccess dispatch onError

Full Usage: perform f arg ofSuccess dispatch onError

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

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

Run a task and dispatch its result. An exception is reported to the error handler.

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

Type something to start searching.