fn generate_sidecar_accessors(
input: &DeriveInput,
info: &SidecarInfo,
) -> Result<TokenStream>Expand description
Generate sidecar accessor constants and extern "C-unwind" functions.
For each public #[r_data] field, generates:
- A getter FFI function (
C__mx_rdata_get_Type_field) - A setter FFI function (
C__mx_rdata_set_Type_field) R_CallMethodDefentries for routine registration- R wrapper function code (roxygen-documented)
- Class-integration code for R6 / S7 (active bindings / properties)
The generated constants are:
RDATA_CALL_DEFS_{TYPE}: slice ofR_CallMethodDeffor registrationR_WRAPPERS_RDATA_{TYPE}: string literal of R wrapper code
Returns Err if the struct has generic type parameters (.Call entrypoints
cannot be generic).