17 releases
| 0.4.10 | Oct 11, 2025 |
|---|---|
| 0.4.8 | Feb 15, 2025 |
| 0.4.7 | Dec 2, 2024 |
| 0.4.6 | Nov 11, 2024 |
| 0.4.3 | Mar 10, 2024 |
#427 in Data structures
1,388 downloads per month
Used in tracing-loki-but-better
46KB
1K
SLoC
small-fixed-array
See module documentation or use cargo doc --open.
lib.rs:
A crate for FixedArray and FixedString, types to provide a smaller memory footprint in exchange for:
- Immutablity,
FixedArrayandFixedStringcannot be mutated without converting back to their expanded forms. - Maximum length,
FixedArrayandFixedStringhave a length cap ofLenT::MAXelements.
These types provide cheap conversions to [Vec] and String, to make up for most of these downsides, but it is
still not recommended to use these collections for mutated values as you will see a performance downside.
These can be thought of as Box<[T]> and Box<str>, except the length is denoted as LenT, by default [u32].
Features
nightly: Speeds upFixedString::lenfor small strings, usingportable_simd.serde: Providesserdeimplementations forFixedArrayandFixedString.typesize: Providestypesizeimplementations forFixedArrayandFixedString.
MSRV
The Minimum Supported Rust Version of this crate is 1.70.
It is considered a breaking change to raise this.
Dependencies
~205KB