Function std::io::cursor::vec_write_vectored

source ·
fn vec_write_vectored<A>(
    pos_mut: &mut u64,
    vec: &mut Vec<u8, A>,
    bufs: &[IoSlice<'_>]
) -> Result<usize>where
    A: Allocator,
Expand description

Resizing write_vectored 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