lib-misc-utils · crate
arrayvec
Kinogaki's own arrayvec, published under the crates.io name so the frozen naga, wgpu, wgpu-core, wgpu-hal and blake3 resolve to it through [patch.crates-io].
- Repository
- lib-misc-utils (kinogaki/lib-misc-utils)
- Folder
libs/lib-misc-utils/crates/arrayvec- Source
- 5 files, 839 lines
- Tests
- 1 file, 144 lines
What it is
Kinogaki's own arrayvec, published under the crates.io name so the frozen naga, wgpu, wgpu-core, wgpu-hal and blake3 resolve to it through [patch.crates-io]. It is not upstream arrayvec: it has the API those crates call.
ArrayVec<T, CAP>: a vector with inline storage for at mostCAPelements. Its storage isbuffer::Buffer, the crate's only unsafe code: a[MaybeUninit<T>; CAP]whose firstlenslots are initialised. Every other operation (insert, remove, drain, retain, extend...) is safe code over the buffer's push, pop, truncate and slice views.ArrayString<CAP>: a string inCAPinline bytes, in safe code.
Depends on
None.
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
smallvec | lib-misc-utils | normal | Kinogaki's own smallvec, published under the crates.io name so the frozen wgpu, wgpu-core, wgpu-hal and harfrust resolve to it through [patch.crates-io], and used by kinogaki-ui. |
Third-party crates using it
Modules
array_string(private)The fixed-capacity string, in safe code: UTF-8 bytes in an inline array.161 linesarray_vec(private)The fixed-capacity vector, in safe code overBuffer.460 linesbuffer(private)The inline buffer: the crate's only unsafe code.149 linesfail(private)Panics, out of line and shared by every element type: generic code calls these instead of formatting a message in each instantiation.19 lines
Public types and traits
At the crate root
Structs ArrayStringArrayVecCapacityErrorDrainIntoIter
By module: 4 public types and traits in 2 modules
array_string ArrayString
array_vec ArrayVecDrainIntoIter
