Skip to main content

to_js

Function to_js 

Source
pub fn to_js<T>(val: &T) -> Result<JsValue, Error>
where T: Serialize,
Expand description

Serialize a value for JavaScript.

ยงErrors

Returns the serializer error when val cannot be represented as a JavaScript value.