fn native_scalar<T: RNativeType>(
sexp: SEXP,
len: impl FnOnce() -> usize,
) -> Result<(), SexpError>Expand description
The checks of a native scalar reference conversion: sexp has T’s R
type and length one. len reads the length, only once the type matched
(a rejected ALTREP of another type must not run its Length callback).
Shared with its preparation, which defers the reference (#1504).