Skip to main content

Module tuples

Module tuples 

Source
Expand description

Tuple conversions: read an R list (VECSXP) positionally into (A, B, ...).

Inbound counterpart of the IntoR tuple family (crate::into_r, tuple to unnamed list region) โ€” same arities (1 through 8), same VECSXP shape.

Semantics:

  • The input must be a list (VECSXP) of exactly N elements; names are ignored (conversion is positional).
  • Element i converts via <Ti as TryFromSexp>::try_from_sexp.
  • All failing elements are collected into one batched diagnostic (1-based positions, matching R indexing) instead of bailing on the first failure.

Macrosยง

impl_tuple_try_from_sexp ๐Ÿ”’
Implement TryFromSexp for tuples of various sizes (1-8). Reads an unnamed R list (VECSXP) positionally; mirrors impl_tuple_into_r!.

Functionsยง

batch_tuple_errors ๐Ÿ”’
check_list_shape ๐Ÿ”’