#stack #str #vec #no-std #string #vector

no-std stack-buf

Vector-like facade for arrays allocated entirely on the stack

6 releases

0.1.6 May 1, 2021
0.1.5 May 1, 2021
0.1.3 Apr 24, 2021

#2701 in Data structures

Download history 1610/week @ 2024-11-17 1280/week @ 2024-11-24 1425/week @ 2024-12-01 1445/week @ 2024-12-08 1249/week @ 2024-12-15 907/week @ 2024-12-22 1123/week @ 2024-12-29 1387/week @ 2025-01-05 1429/week @ 2025-01-12 1630/week @ 2025-01-19 1677/week @ 2025-01-26 1411/week @ 2025-02-02 1305/week @ 2025-02-09 1164/week @ 2025-02-16 1391/week @ 2025-02-23 1576/week @ 2025-03-02

5,552 downloads per month
Used in 5 crates (2 directly)

MIT/Apache

76KB
1.5K SLoC

stack-buf

Crates.io: stack-buf Documentation

License: Apache OR License: MIT

Vector-like facade for arrays allocated entirely on the stack. Shallow wrapper around an underlying [T; N], which panics if the array bounds are exceeded.

Please read the API docs here.

Optional features

std

Enabled by default. Use std library; disable to use no_std instead.

str

When this optional dependency is enabled, StackStr is available.

serde

When this optional dependency is enabled, StackVec and StackStr implement the serde::Serialize and serde::Deserialize traits.

Rust Version

This version of stack-buf requires Rust 1.51 or later.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in stack-buf by you, shall be licensed as Apache-2.0 and MIT, without any additional terms or conditions.

Acknowledgment

stack-buf is inspired by arrayvec and stackvector, and copy code snippets from them.

Dependencies

~155KB