Function stackalloc::helpers::slice_assume_init
source · [−]pub unsafe fn slice_assume_init<T>(buf: &[MaybeUninit<T>]) -> &[T]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Expand description
Convert a slice of MaybeUninit<T>
to T
.
This is the same as the unstable core library function MaybeUninit::slice_assume_init()
Safety
The caller must ensure all elements of buf
have been initialised before calling this function.