pub fn expand_impl(attr: TokenStream, item: TokenStream) -> TokenStreamExpand description
Top-level entry point for expanding #[miniextendr] on impl blocks.
Dispatches between two cases:
- Inherent impls (
impl Type { ... }): ParsesImplAttrsandParsedImpl, then generates C wrappers, R wrapper code,R_CallMethodDefarrays, andas.<class>()trait impls for the chosen class system. - Trait impls (
impl Trait for Type { ... }): Generates trait ABI vtables, cross-package shims, and R wrappers viaexpand_miniextendr_impl_trait.
§Arguments
attr- The token stream inside#[miniextendr(...)](class system, options)item- The fullimplblock token stream
§Returns
A token stream containing the original impl block (with miniextendr attrs stripped),
C wrapper functions, an R wrapper string constant, a R_CallMethodDef array constant,
and any forwarding trait impls for as.<class>() coercion.