indexvec 0.2.0

Simplified copy of rustc's index crate
Documentation
indexvec-0.2.0 has been yanked.

Newtype Index

A simplified copy of rustc's index crate.

Examples

newtype_index! {
    pub struct MyIndex;
}

// Shorthand for the above
newtype_index!(pub MyIndex);

// Full example of all features
newtype_index! {
    #[derive(SomeTrait)]
    pub struct MyIndex {
        pub const A = 5;
        pub const B = 999;
    }
}

Serde can be enabled with the serde feature.