Macro bump_into::space_uninit [−][src]
Creates an uninitialized array of MaybeUninit without allocating,
suitable for taking a slice of to pass into BumpInto::from_slice.
Example
use bump_into::space_uninit; use core::mem; // an array of MaybeUninit<u8> is created by default: let mut space = space_uninit!(64); assert_eq!(mem::size_of_val(&space), 64); assert_eq!(mem::align_of_val(&space), 1); // if you need your space to have the alignment of a // particular type, you can use an array-like syntax. // this line will create an array of MaybeUninit<u32>: let mut space = space_uninit!(u32; 16); assert_eq!(mem::size_of_val(&space), 64); assert_eq!(mem::align_of_val(&space), 4);