IntoJsWrapper

Trait IntoJsWrapper 

Source
pub trait IntoJsWrapper {
    type Result: Into<JsValue>;

    // Required method
    fn into_js_wrapper(self) -> Self::Result;
}
Expand description

For structs that were originally implemented in Rust but also have a dedicated JavaScript-compatible wrapper.

This allows accepting Rust values as functions for a Callback

Required Associated Types§

Source

type Result: Into<JsValue>

This is the type that should returned from into_js_wrapper

Required Methods§

Source

fn into_js_wrapper(self) -> Self::Result

Converts a value into another value that can be converted into a JsValue

Implementors§