pub trait AsHandleValue<'a> {
// Required method
fn as_handle_value(&'a self) -> HandleValue<'a>;
}Expand description
Converts a rooted Heap<Value> into a HandleValue.
This is only safe if the Heap is rooted (e.g., held inside a Dom-managed struct),
and the #[must_root] crown lint is active to enforce rooting at compile time.
Avoids repeating unsafe from_raw calls at each usage site.