Expand description
Vtable static generation, C wrapper generation, and method attribute parsing for trait impls.
This module contains the core codegen for #[miniextendr] on impl Trait for Type blocks.
It produces the vtable static constant, C-callable wrapper functions for each method and
associated constant, and delegates to super::r_wrappers for R wrapper code generation.
Structsยง
- Trait
Method ๐Attrs - Parsed
#[miniextendr(...)]attributes for a single trait method.
Functionsยง
- extract_
consts ๐ - Extract associated constant items from a trait impl block.
- extract_
methods ๐ - Extract all methods from a trait impl block as
TraitMethodstructs. - generate_
concrete_ ๐vtable_ shims - Generate concrete vtable shims for a generic trait impl.
- generate_
trait_ ๐const_ c_ wrapper - Generate a C wrapper function and
R_CallMethodDeffor a trait associated constant. - generate_
trait_ ๐method_ c_ wrapper - Generate a C wrapper function and
R_CallMethodDeffor a single trait method. - generate_
vtable_ ๐static - Generate the vtable static, C wrappers, R wrappers, and call defs for a trait implementation.
- is_
self_ ๐ref_ type - Check if a type is
&Selfor&mut Self. - output_
is_ ๐result - Returns true when the return type is syntactically
Result<_, _>. - parse_
trait_ ๐method_ attrs - Parse
#[miniextendr(...)]attributes from a trait method.