Function or value | Description |
Full Usage:
attempt f arg ofError
Parameters:
'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).
|
Full Usage:
either f arg ofSuccess ofError
Parameters:
'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).
|
Full Usage:
perform f arg ofSuccess
Parameters:
'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.
|