pub(crate) fn fill_region<T>(
start: usize,
len: usize,
total_len: usize,
out: &mut [T],
elt: impl FnMut(usize) -> T,
) -> usizeExpand description
Helper for ALTREP get_region implementations.
R guarantees that the caller-provided buffer is at least len long. This
helper clamps the requested range to the vector’s total length and the
actual buffer length, then fills out with values from the provided
element accessor.