Expand description
§indexland_derive
Provides derive macros for indexland. For better ergonomics add the
"derive" feature to indexland instead of depending on this directly.
§Example
// [`indexland_derive::Idx`](indexland_derive::Idx) is re-exported by indexland
use indexland::Idx;
#[derive(Idx)]
struct NodeId(u32);
#[derive(Idx)]
enum PrimaryColor {
Red,
Green,
Blue,
};§License
Derive Macros§
- Idx
- For structs this is equivalent to
#[derive(IdxNewtype)], for enums to#[derive(IdxEnum)]. - IdxEnum
- Implements the following traits:
- IdxNewtype
- Implements the following traits: