Module rpc

Source
Expand description

The RPC module includes utilities to send messages to the JS layer of the webview.

Functionsยง

format_callback
Formats a function name and argument to be evaluated as callback.
format_callback_result
Formats a Result type to its Promise response. Useful for Promises handling. If the Result is_ok(), the callback will be the success_callback function name and the argument will be the Ok value. If the Result is_err(), the callback will be the error_callback function name and the argument will be the Err value.