Skip to main content

checked_rows_into_sexp

Function checked_rows_into_sexp 

Source
#[doc(hidden)]
pub fn checked_rows_into_sexp<T: StrictRInt, R: AsRef<[T]>>( container: &str, rows: impl ExactSizeIterator<Item = Option<R>>, ) -> SEXP
Expand description

The list-of-vectors strict conversion (Vec<Vec<T>>, Vec<Option<Vec<T>>>): validate every element of every row, then build the list of integer vectors (None rows become NULL).

Walks every row before panicking, so one panic lists every out-of-range element: its row is the (element N) position, and its place inside the row is the inner position. Nothing is allocated in R until the whole input has passed, so the panic leaves no partial list behind.