[−][src]Macro bump_into::space_zeroed
Creates a zeroed array of MaybeUninit on the stack,
suitable for taking a slice of to pass into BumpInto::from_slice.
Examples
use bump_into::space_zeroed; use core::mem; // an array of MaybeUninit<u8> is created by default: let mut space = space_zeroed!(64); assert_eq!(mem::size_of_val(&space), 64); assert_eq!(mem::align_of_val(&space), 1); // you can also specify a type if you need your space to // have a particular alignment: let mut space = space_zeroed!(u32; 16); assert_eq!(mem::size_of_val(&space), 64); assert_eq!(mem::align_of_val(&space), 4);