OfAuthorized Module

Functions and values

Function or value Description

attempt f arg ofError

Full Usage: attempt f arg ofError

Parameters:
    f : 'req -> Async<'resp> - The remote function.
    arg : 'req - The argument to the remote function.
    ofError : exn -> 'msg - Construct a message from an error response.

Returns: Cmd<'msg> An Elmish command that will call the remote function and dispatch messages based on the result.

Command that will call a remote Bolero function with authorization and map the error (of exception).

f : 'req -> Async<'resp>

The remote function.

arg : 'req

The argument to the remote function.

ofError : exn -> 'msg

Construct a message from an error response.

Returns: Cmd<'msg>

An Elmish command that will call the remote function and dispatch messages based on the result.

either f arg ofSuccess ofError

Full Usage: either f arg ofSuccess ofError

Parameters:
    f : 'req -> Async<'resp> - The remote function.
    arg : 'req - The argument to the remote function.
    ofSuccess : 'resp option -> 'msg - Construct a message from a successful response.
    ofError : exn -> 'msg - Construct a message from an error response.

Returns: Cmd<'msg> An Elmish command that will call the remote function and dispatch messages based on the result.

Command that will call a remote Bolero function with authorization and map the result into successful Some if authorized, successful None if not, or error (of exception).

f : 'req -> Async<'resp>

The remote function.

arg : 'req

The argument to the remote function.

ofSuccess : 'resp option -> 'msg

Construct a message from a successful response.

ofError : exn -> 'msg

Construct a message from an error response.

Returns: Cmd<'msg>

An Elmish command that will call the remote function and dispatch messages based on the result.

perform f arg ofSuccess

Full Usage: perform f arg ofSuccess

Parameters:
    f : 'req -> Async<'resp> - The remote function.
    arg : 'req - The argument to the remote function.
    ofSuccess : 'resp option -> 'msg - Construct a message from a successful response.

Returns: Cmd<'msg> An Elmish command that will call the remote function and dispatch messages based on the result.

Command that will call a remote Bolero function with authorization and map the result into Some if authorized, None if not, discarding any possible error.

f : 'req -> Async<'resp>

The remote function.

arg : 'req

The argument to the remote function.

ofSuccess : 'resp option -> 'msg

Construct a message from a successful response.

Returns: Cmd<'msg>

An Elmish command that will call the remote function and dispatch messages based on the result.