#stack #vector #push #stack-vector #stack-vec

stack-vector

Vec-like wrapper for an array allocated on the stack

3 releases

Uses new Rust 2024

0.1.2 Apr 5, 2025
0.1.1 Apr 5, 2025
0.1.0 Apr 5, 2025

#112 in #push

Download history 342/week @ 2025-04-05 10/week @ 2025-04-12 1/week @ 2025-04-19

353 downloads per month

MIT license

13KB
203 lines

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

Stack-Vector

Vec-like wrapper for an array allocated on the stack

== Documentation == To read the library documentation run cargo doc or browse the online docs at https://docs.rs/stack-vector

No runtime deps