Function vec_write_all
pub(in ::io::cursor) fn vec_write_all<A>(pos_mut: &mut u64, vec: &mut Vec<u8, A>, buf: &[u8]) -> Result<usize>
where
A: Allocator,
Resizing write_all implementation for Cursor.
Cursor is allowed to have a pre-allocated and initialised
vector body, but with a position of 0. This means the Write
will overwrite the contents of the vec.
This also allows for the vec body to be empty, but with a position of N.
This means that Write will pad the vec with 0 initially,
before writing anything from that point