1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Simple traits for builtin enum items.
//! Primarily used by `enum_traits_macros` when automatically deriving types.
//! The crate `enum_traits_macros` is required for the derives.
///Represents the type used for indexing the variants of the enum item.
///`Type` should be an primitive integer type and have more values or an equal number of values compared to the number of variants in the enum item.
///
///Derive this trait for an enum automatically using `#[derive(EnumIndex)]`
///When derived, `Type` becomes the type specified in the `repr` attribute for the enum item.
///If a `repr` attribute does not exist, a calculated minimum integer type based on the number of variant fields is used instead.
///Derive this trait for an enum automatically using `#[derive(EnumFromIndex)]`
///Derive this trait for an enum automatically using `#[derive(EnumToIndex)]`
///Derive this trait for an enum automatically using `#[derive(EnumLen)]`
///Derive this trait for an enum automatically using `#[derive(EnumEnds)]`
///Derive this trait for an enum automatically using `#[derive(EnumDiscriminant)]`
///This trait can only be derived when every item have an explicitly defined discriminant.
///Derive this trait for an enum automatically using `#[derive(EnumIter)]`