pub unsafe fn buffered<O, P>(
n: usize,
out: &mut [MaybeUninit<P>],
f: impl FnOnce(&mut [MaybeUninit<O>]) -> bool,
each: impl Fn(O) -> P,
) -> boolwhere
O: Copy,Expand description
f, a slice form writing n outputs of type O, run into a buffer, with each turning each output into the P that out takes. It gives f’s result.
§Safety
f must initialize every output slot it receives before returning.