Skip to main content

checked_elems_into_sexp

Function checked_elems_into_sexp 

Source
fn checked_elems_into_sexp<T: StrictRInt>(
    container: &str,
    elems: impl ExactSizeIterator<Item = Option<T>>,
) -> SEXP
Expand description

The Vec<T> / Vec<Option<T>> strict conversion: None is NA_integer_.

Walks the whole vector, batching every out-of-range element into one panic instead of aborting at the first — see panic_strict_vec_batched.