Crate stack_vector

Source
Expand description

A vector-like object allocated on the stack

§Example

use stack_vector::StackVec;

let mut sv = StackVec::<i32, 10>::new();

sv.push(1);

if false {
    sv.push(2);
}

sv.push(3);

if true {
    sv.push(4);
}

assert_eq!(sv.as_slice(), &[1, 3, 4]);

Structs§

StackVec
A [Vec]-like wrapper for an array.