lib-misc-utils · crate

smallvec

Libraryenvironment

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
depends onused by tests alonedependencies for tests alone are listed below, not drawn

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

CrateRepositoryAsWhat it is
arrayveclib-misc-utilsnormalKinogaki'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

CrateRepositoryAsWhat it is
kinogaki-uilib-uinormalKinogaki UI: the immediate-mode UI framework Kinogaki applications are built on.

Third-party crates using it

harfrust, wgpu, wgpu-core, wgpu-hal

Modules

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