Expand description
Shared utilities for handling method return values in R wrapper generation.
This module provides helpers for generating consistent return value handling across all class systems (Env, R6, S7, S3, S4).
Structs§
- Method
Return Builder - Builder for generating R method body lines with appropriate return handling.
- Return
Tails 🔒 - Class-specific tail closures, one per
ReturnStrategyvariant.
Enums§
- Return
Strategy - Return handling strategy for class methods.
Functions§
- condition_
check_ inline_ block - Generate an inline R error-check block for single-expression contexts (S7, S4).
- condition_
check_ lines - Generate the R guard that re-raises a tagged Rust error/condition value.
- condition_
check_ lines_ with_ default condition_check_lineswith an explicit raise fallback (CallAttribution::raise_default):environment()for an S3 method, whose frame the raise helper turns into the generic’s call (#1851).- standalone_
body - Generate a standalone-function R wrapper body.
- standalone_
body_ with_ call_ default standalone_bodywith an explicit raise fallback:sys.call()for the wrapper’s own frame,.mx_callforcall = callerwrappers,NULLundercall = noneandenvironment()for an S3 method (seecrate::r_wrapper_builder::CallAttribution::raise_default).