Logo MVUish.Avalonia

OfValueTask 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 -> ValueTask
    arg : 'Arg
    ofError : exn -> 'Msg
    dispatch : Dispatch<'Msg>
    onError : string * exn -> unit

Modifiers: inline
Type parameters: 'Arg, 'Msg

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

f : 'Arg -> ValueTask
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 -> ValueTask<'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 value task and map success or exception into messages.

f : 'Arg -> ValueTask<'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 -> ValueTask<'Result>
    arg : 'Arg
    ofSuccess : 'Result -> 'Msg
    dispatch : Dispatch<'Msg>
    onError : string * exn -> unit

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

Run a value task and dispatch its result. Value tasks that are already completed dispatch without allocating a continuation. An exception is reported to the error handler.

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

Type something to start searching.