Function presser::clone_into_maybe_uninit_slice
source · [−]pub fn clone_into_maybe_uninit_slice<'a, T>(
src: &[T],
dst: &'a mut [MaybeUninit<T>]
) -> &'a mut [T]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]where
T: Clone,Expand description
Clones the elements from src to dst, returning a mutable reference to the now initialized contents of dst.
Any already initialized elements will not be dropped.
If T implements Copy, use copy_into_maybe_uninit_slice
This is similar to slice::clone_from_slice but does not drop existing elements. This is identical to the implementation of
the method write_to_slice_cloned on MaybeUninit, but that API is as yet unstable.
Panics
This function will panic if the two slices have different lengths, or if the implementation of Clone panics.
If there is a panic, the already cloned elements will be dropped.