[][src]Macro fixedvec::alloc_stack

macro_rules! alloc_stack {
    ([$item_type:ty; $len:expr]) => { ... };
}

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);