Function generic_copy

pub(in ::io::copy) fn generic_copy<R, W>(reader: &mut R, writer: &mut W) -> Result<u64>
where
    R: Read + ?Sized,
    W: Write + ?Sized,

The userspace read-write-loop implementation of io::copy that is used when OS-specific specializations for copy offloading are not available or not applicable.

This function is able to perform a mild amount of specialization based on the size of the reader and writer buffers, if they have any.

Currently, [u8], Vec<u8>, VecDeque<u8>, BufReader<T> and BufWriter<T> are specialized with.