5 releases
0.5.4 | Mar 19, 2022 |
---|---|
0.5.3 | Mar 19, 2022 |
0.5.1 | Dec 4, 2021 |
0.4.0 |
|
0.1.3 |
|
#1286 in Data structures
41 downloads per month
Used in 2 crates
11KB
331 lines
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.
Dependencies
~165KB