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§
Sourcetype Result: Into<JsValue>
type Result: Into<JsValue>
This is the type that should returned from into_js_wrapper
Required Methods§
Sourcefn into_js_wrapper(self) -> Self::Result
fn into_js_wrapper(self) -> Self::Result
Converts a value into another value that can be converted into a JsValue