Skip to main content

generate_tpie_invocation

Function generate_tpie_invocation 

Source
fn generate_tpie_invocation(
    trait_path: &Path,
    concrete_type: &Type,
    class_system: ClassSystem,
    class_has_no_rd: bool,
    internal: bool,
    noexport: bool,
) -> TokenStream
Expand description

Generate vtable static + TPIE macro invocation for an empty trait impl.

When #[miniextendr] impl Trait for Type {} has no method bodies, this generates the vtable static and delegates to the __mx_impl_{Trait}! macro (generated at the trait definition site) to expand C/R wrappers.

Requires a fully qualified trait path (at least 2 segments) so the TPIE macro can be resolved from the trait’s crate root.