Skip to main content

Module structs

Module structs 

Source

Functions§

gen_opaque_struct
Generate an opaque wrapper struct with inner: Arc<core::Type>. For trait types, uses Arc<dyn Type + Send + Sync>.
gen_opaque_struct_prefixed
Generate an opaque wrapper struct with inner: Arc<core::Type> and a Js prefix.
gen_struct
Generate a struct definition using the builder.
gen_struct_default_impl
Generate a Default impl for a non-opaque binding struct with has_default. All fields use their type’s Default::default(). Optional fields use None instead of Default::default(). This enables the struct to be used with unwrap_or_default() in config constructors.
gen_struct_with_per_field_attrs
Generate a struct definition using the builder, with a per-field attribute callback.