Skip to main content

generate_r_wrapper_for_slot

Function generate_r_wrapper_for_slot 

Source
fn generate_r_wrapper_for_slot(
    class_system: ClassSystem,
    type_name: &str,
    field_name: &str,
    getter_c_name: &str,
    setter_c_name: &str,
) -> String
Expand description

Generate R wrapper code (roxygen-annotated R functions) for a single sidecar slot.

Produces getter and setter R functions that call the corresponding C entry points via .Call. The generated R code includes roxygen tags (@rdname, @param, @return, @export) for documentation.

All class systems currently generate the same standalone function pattern (Type_get_field / Type_set_field). Class-specific integration (e.g., R6 active bindings, S7 properties) is handled separately by generate_class_integration_r_code.