Skip to main content

generate_class_integration_r_code

Function generate_class_integration_r_code 

Source
fn generate_class_integration_r_code(
    class_system: ClassSystem,
    type_name: &str,
    pub_slots: &[&SidecarSlot],
) -> String
Expand description

Generate class-integrated R code for sidecar fields.

For R6: generates Type$set("active", "field", ...) calls that add active bindings referencing the sidecar getter/setter .Call entrypoints.

For S7: generates .rdata_properties_Type <- list(...) with S7::new_property() definitions that can be spliced into the S7 class’s properties list.

Other class systems return empty strings (their standalone accessors suffice).