#slice #array #vec #no-std

no-std slicevec

A vector using an external slice as backing storage

2 releases

Uses old Rust 2015

0.1.1 Jul 13, 2017
0.1.0 Jul 12, 2017

#245 in #vec

CC0 license

13KB
244 lines

The SliceVec crate

Build Status

SliceVec provides a dynamically growing vector using an external slice as the backing storage. This means that SliceVec is completely allocation-free and can be used in no_std environments.

In contrast to the very similar arrayvec crate, the user must provide the backing storage (which can reside anywhere in writable memory), it is not created automatically. While this makes SliceVec a bit less ergonomic since it requires more boilerplate code to use, it works with any size of slice (fixed-size array are limited to a fixed set of sizes, due to Rust's lack of integer generics).


lib.rs:

Provides a vector that uses an external slice for storage.

No runtime deps