pub trait ToValue<'cx> {
// Required method
fn to_value(&self, cx: &'cx Context, value: &mut Value<'_>);
// Provided method
fn as_value(&self, cx: &'cx Context) -> Value<'cx> { ... }
}Expand description
Represents types that can be converted to JavaScript Values.