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
use ;
/**
The `Index` type, a.k.a. `δ`, is used to represent a `usize` value at
the _type level_.
`Index` is simply defined to be parameterized by a _const-generic_ value
of type `usize`. It is most often used to access generic fields by their
_index_, instead of by their _name_.
`Index` is also shown as `δ` to improve the readability of compiler error
messages.
## Example
Given the following struct definition:
```rust,ignore
pub struct MyContext(pub u32);
```
The following `HasField` implementation would be generated, with use of
`Index<0>` as the field tag:
```rust,ignore
impl HasField<Index<0>> for MyContext {
type Value = u32;
fn get_field(&self) -> &u32 {
&self.0
}
}
*/
;
pub use δ as Index;