unsafe fn write_to_spare_capacity_of_vec<T>(
    output: &mut Vec<u8>,
    writer: impl FnOnce(&mut [MaybeUninit<u8>]) -> (usize, T),
) -> TExpand description
Allows writer to write data into the spare capacity of the output vector.
This will not reallocate the vector provided or attempt to grow it, so space
for the output must be reserved by the caller before calling this
function.
writer needs to return the number of bytes written (and can also return
another arbitrary return value).
ยงSafety:
The length returned by the writer must be equal to actual number of bytes written
to the uninitialized slice passed in and initialized.