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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*!
Crate for using type level values and functions.
# Introduction
[For the introduction to this library go here.](./docs/guide/introduction/index.html)
# Guide
This guide will guide any user towards defining type-level-values and using them,
starting with simple examples,then getting gradually more complex.
The guide is [here](./docs/guide/index.html),
and it starts [here](./docs/guide/introduction/index.html),
# Reference
Derive macros from `derive_type_level`:
- [TypeLevel derive macro.](./docs/attribute_typelevel/index.html)
- [MutConstValue derive macro.](./docs/attribute_mut_const_value/index.html)
Miscelaneous things:
- [Control Flow:
On how to do control flow on the type-level.
](./docs/appendix_control_flow/index.html)
- [Privacy:
Details on how TypeLevel deals with privacy.
](./docs/reference_privacy/index.html)
- [reading error messages:
How to read error messages by the compiler.
](./docs/appendix_error_messages/index.html)
- [Patterns: Programming patterns in this library.](./docs/appendix_patterns/index.html)
- [type-level-functions](./docs/appendix_functions/index.html)
# Documentation
For documentation outside of API docs go [here](./docs/index.html).
# Minimum supported Rust version
This package support rust back to 1.20 .
Using a build script to enable features after Rust 1.20.
# no-std support
To use this crate in no_std contexts disable the default-feature.
Disabling the std feature disables these things:
- the MutConstParam methods taking Box/Rc/Arc.
# Cargo Features
"std":Enables standard library support,otherwise uses the core library.Enabled by default.
"serde":Enables serde support.Enabled by default.
"large_tlist":to enable fixed-size impls for type-lists of
up to 32 elements instead of 16 elements,
*/
// this is pub because it is used by the derive macros to access the standard/core library.
pub extern crate std as std_;
// this is pub because it is used by the derive macros to access the standard/core library.
pub extern crate core as std_;
pub extern crate typenum;
pub extern crate core_extensions;
extern crate derive_type_level;
extern crate serde;
extern crate num_traits;
use *;
pub
pub
// emulating Rust 2018 edition's crate:: prefix.
// Used instead of it so as to stay compatible with Rust pre-1.30 .