Trait rtrb::CopyToUninit [−][src]
pub trait CopyToUninit<T: Copy> { fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>]); }
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::CopyToUninit;
Required methods
fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>])
[src]
fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>])
[src]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.