eval_json

Function eval_json 

Source
pub fn eval_json(js_expr: &str) -> Result<JsValue, AnyError>
Expand description

Evaluates a standalone Javascript expression, and returns the result as a JSON value.

If there is an error, Err will be returned. This function is primarily useful for small standalone experiments. Usually, you would want to use the Script struct for more sophisticated Rust->JS interaction.