Newtype Index
A simplified copy of rustc's index crate.
Examples
newtype_index!
// Shorthand for the above
newtype_index!;
// Full example of all features
newtype_index!
Serde can be enabled with the serde
feature.
A simplified copy of rustc's index crate.
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.