try_fill_chunks

Function try_fill_chunks 

Source
pub(crate) fn try_fill_chunks<T: Send, E: Send>(
    data: &mut [T],
    size: usize,
    parallel: bool,
    fill: impl Fn(usize, &mut [T]) -> Result<(), E> + Sync + Send,
) -> Result<(), E>
Expand description

Fill data chunk by chunk with fill(index, chunk), stopping at the first error.