pub trait CopyToUninit<T: Copy + Send + 'static> {
    fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>]) -> &mut [T]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8];
}
Expand description

Extension trait used to provide a copy_to_uninit() method on built-in slices.

This can be used to safely copy data to the slices returned from WriteChunkUninit::as_mut_slices().

To use this, the trait has to be brought into scope, e.g. with:

use rtrb_basedrop::CopyToUninit;

Required Methods

Copies contents to a possibly uninitialized slice.

Implementations on Foreign Types

Copies contents to a possibly uninitialized slice.

Panics

This function will panic if the two slices have different lengths.

Implementors