1 unstable release

new 0.1.0 Feb 22, 2025

#1804 in Data structures

MIT license

110KB
3K SLoC

Indexland

githubgithub-buildcrates-iomsrvdocs-rs

Collections based on newtype indices for increased type safety and self documenting code.

Part of the Typeline project, not ready for public use yet.

Usage Examles

use indexland::{index_newtype, IndexVec};
index_newtype!{
    struct FooIndex(u32);
    struct BarIndex(u32);
}
struct Foo; //...
struct Bar; //...
struct Baz{
    foos: IndexVec<FooIndex, Foo>,
    bars: IndexVec<FooIndex, Foo>,
    foo_offset: FooIndex,
    // ...
}

License

MIT

Dependencies

~0.4–0.9MB
~19K SLoC