macro_rules! alloc_stack {
([$item_type:ty; $len:expr]) => { ... };
}
Expand description
Convenience macro for use with FixedVec
. Allocates the specified number
of elements of specified type on the stack.
ยงExample
// Allocate space for 16 u8's
let mut space = alloc_stack!([u8; 16]);
// Give the space to a `FixedVec`, which manages it from here on out
let vec = FixedVec::new(&mut space);