Macro Index
macro_rules! Index { ... }
What #[derive(Index)] generates
Deriving Index only works for a single field of a struct.
The result is that you will index it's member directly.
With #[index] or #[index(ignore)] it's possible to indicate the field that
you want to derive Index for.
Example usage
# use Index;
#
;
// You can specify the field you want to derive Index for
assert_eq!;
assert_eq!;
Structs
When deriving Index for a struct:
# use Index;
#
Code like this will be generated:
#
Enums
Deriving Index is not supported for enums.