pub trait JsData { }Expand description
Represents a type that can be stored inside aJsObject.
This can be automatically derived using a macro.
§Example
useboa_engine::{Finalize, JsData, JsObject, Trace};#[derive(Trace, Finalize, JsData)]structCustomStruct {#[unsafe_ignore_trace]counter: usize,}letobject = JsObject::from_proto_and_data(None, CustomStruct { counter:5});assert_eq!(object.downcast_ref::<CustomStruct>().unwrap().counter,5);