fn generate_getter_body(
struct_name: &Ident,
slot: &SidecarSlot,
_prot_index_lit: &LitInt,
) -> TokenStreamExpand description
Generate the token stream for a sidecar getter function body.
Reads the field value from the Rust struct (accessed via the external pointer address) and converts it to an R SEXP. The conversion strategy depends on the slot kind:
RawSexp: returns the SEXP field directly.- Scalar kinds: wraps in
Rf_Scalar*for zero-overhead conversion. Conversion: clones the value and callsIntoR::into_sexp.
Returns R_NilValue if the external pointer address is null.