TryIntoJsResult

Trait TryIntoJsResult 

Source
pub trait TryIntoJsResult {
    // Required method
    fn try_into_js_result(self, context: &mut Context) -> JsResult<JsValue>;
}
Expand description

Create a JsResult from a Rust value. This trait is used to convert Rust types to JS types, including JsResult of Rust values and JsValues.

This trait is implemented for any that can be converted into a JsValue.

Required Methods§

Source

fn try_into_js_result(self, context: &mut Context) -> JsResult<JsValue>

Try to convert a Rust value into a JsResult<JsValue>.

§Errors

Any parsing errors that may occur during the conversion, or any error that happened during the call to a function.

Implementors§