#[derive(HasRefs)]
{
// Attributes available to this derive:
#[quickjs]
}
Expand description
A macro to derive HasRefs
Attribute | Description |
crate = "rquickjs" | Allows rename rquickjs crate |
Attribute | Description |
has_refs | Mark a field which has referenses |
#[derive(HasRefs)]
struct Data {
#[quickjs(has_refs)]
lists: HashMap<String, Persistent<Array<'static>>>,
#[quickjs(has_refs)]
func: Persistent<Function<'static>>,
flag: bool,
text: String,
}
#[derive(HasRefs)]
enum Data {
Lists(
#[quickjs(has_refs)]
HashMap<String, Persistent<Array<'static>>>
),
Func {
name: String,
#[quickjs(has_refs)]
func: Persistent<Function<'static>>,
},
Flag(bool),
Text(String),
}