lib-misc-utils · crate
smallvec
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.
- Repository
- lib-misc-utils (kinogaki/lib-misc-utils)
- Folder
libs/lib-misc-utils/crates/smallvec- Source
- 2 files, 719 lines
- Tests
- 1 file, 95 lines
What it is
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. It is not upstream smallvec: it has the API those crates call.
[SmallVec<[T; N]>] keeps up to N elements inline (in our arrayvec) and moves them to a Vec when an element no longer fits ("spills"). As upstream, it stays on the heap after that until shrink_to_fit moves elements that fit back inline. Safe code throughout; the only unsafe code underneath is arrayvec's documented inline buffer.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
arrayvec | lib-misc-utils | normal | 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]. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-ui | lib-ui | normal | Kinogaki UI: the immediate-mode UI framework Kinogaki applications are built on. |
Third-party crates using it
Modules
small_vec(private)The small vector: inline storage that spills to aVec.674 lines
Public types and traits
At the crate root
Traits Array
Structs DrainIntoIterSmallVec
Macros smallvec
By module: 3 public types and traits in 1 module
small_vec DrainIntoIterSmallVec
