[−][src]Trait arraylib::MaybeUninitSlice
Extension for maybe uninitialized slices ([MaybeUninit<_>]
)
Associated Types
type InitItem
Initialized item i.e.
[MaybeUninit<T>]: MaybeUninitSlice<InitItem = T>
Required methods
unsafe fn assume_init(&self) -> &[Self::InitItem]
Assume that all items of self are initialized
Safety
It is up to the caller to guarantee that all elements of the array are
really in an initialized state. Calling this when the content is not
yet fully initialized causes immediate undefined behavior. The
MaybeUninit's
type-level documentation contains
more information about this initialization invariant.
See also MaybeUninit::assume_init
documentation.
unsafe fn assume_init_mut(&mut self) -> &mut [Self::InitItem]
Assume that all items of self are initialized
Safety
It is up to the caller to guarantee that all elements of the array are
really in an initialized state. Calling this when the content is not
yet fully initialized causes immediate undefined behavior. The
MaybeUninit's
type-level documentation contains
more information about this initialization invariant.
See also MaybeUninit::assume_init
documentation.
fn from_init(init: &[Self::InitItem]) -> &Self
Create self from initialized slice
fn from_init_mut(init: &mut [Self::InitItem]) -> &mut Self
Create self from initialized slice