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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
use crate::Hash;
use crate::RawStr;
use std::cmp;
use std::hash;
use std::vec;
#[derive(Debug)]
#[repr(C)]
pub struct StaticType {
pub name: RawStr,
pub hash: Hash,
}
impl cmp::PartialEq for &'static StaticType {
fn eq(&self, other: &Self) -> bool {
self.hash == other.hash
}
}
impl cmp::Eq for &'static StaticType {}
impl hash::Hash for &'static StaticType {
fn hash<H: hash::Hasher>(&self, state: &mut H) {
self.hash.hash(state)
}
}
pub static UNIT_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("unit"),
hash: Hash::new(0x9de148b05752dbb3),
};
impl_static_type!(() => UNIT_TYPE);
impl_static_type!(crate::UnitStruct => UNIT_TYPE);
pub static BYTE_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("byte"),
hash: Hash::new(0x190cacf7c7187189),
};
impl_static_type!(u8 => BYTE_TYPE);
pub static BOOL_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("bool"),
hash: Hash::new(0xbe6bff4422d0c759),
};
impl_static_type!(bool => BOOL_TYPE);
pub static CHAR_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("char"),
hash: Hash::new(0xc56a31d061187c8b),
};
impl_static_type!(char => CHAR_TYPE);
pub static INTEGER_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("integer"),
hash: Hash::new(0xbb378867da3981e2),
};
impl_static_type!(i8 => INTEGER_TYPE);
impl_static_type!(u16 => INTEGER_TYPE);
impl_static_type!(i16 => INTEGER_TYPE);
impl_static_type!(u32 => INTEGER_TYPE);
impl_static_type!(i32 => INTEGER_TYPE);
impl_static_type!(u64 => INTEGER_TYPE);
impl_static_type!(i64 => INTEGER_TYPE);
impl_static_type!(u128 => INTEGER_TYPE);
impl_static_type!(i128 => INTEGER_TYPE);
pub static FLOAT_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("float"),
hash: Hash::new(0x13e40c27462ed8fc),
};
impl_static_type!(f32 => FLOAT_TYPE);
impl_static_type!(f64 => FLOAT_TYPE);
pub static STRING_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("String"),
hash: Hash::new(0x823ede4114ff8de6),
};
impl_static_type!(String => STRING_TYPE);
impl_static_type!(str => STRING_TYPE);
pub static BYTES_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Bytes"),
hash: Hash::new(0x957fa73126817683),
};
impl_static_type!(crate::Bytes => BYTES_TYPE);
impl_static_type!([u8] => BYTES_TYPE);
pub static VEC_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Vec"),
hash: Hash::new(0x6c129752545b4223),
};
impl_static_type!(crate::Vec => VEC_TYPE);
impl_static_type!(impl<T> vec::Vec<T> => VEC_TYPE);
impl_static_type!([crate::Value] => VEC_TYPE);
impl_static_type!(impl<T> crate::VecTuple<T> => VEC_TYPE);
pub static TUPLE_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Tuple"),
hash: Hash::new(0x6da74f62cfa5cc1f),
};
impl_static_type!(crate::Tuple => TUPLE_TYPE);
pub static OBJECT_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Object"),
hash: Hash::new(0x65f4e1cf10b1f34c),
};
impl_static_type!(crate::Object => OBJECT_TYPE);
impl_static_type!(crate::Struct => OBJECT_TYPE);
pub static RANGE_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Range"),
hash: Hash::new(0xde6d8aadf191516b),
};
impl_static_type!(crate::Range => RANGE_TYPE);
pub static FUTURE_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Future"),
hash: Hash::new(0xafab4a2797436aee),
};
impl_static_type!(crate::Future => FUTURE_TYPE);
pub static GENERATOR_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Generator"),
hash: Hash::new(0x50deff8c6ef7532c),
};
impl_static_type!(crate::Generator => GENERATOR_TYPE);
pub static GENERATOR_STATE_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("GeneratorState"),
hash: Hash::new(0xdd4141d4d8a3ac31),
};
impl_static_type!(crate::GeneratorState => GENERATOR_STATE_TYPE);
pub static STREAM_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Stream"),
hash: Hash::new(0xd94133730d02c3ea),
};
impl_static_type!(crate::Stream => STREAM_TYPE);
pub static RESULT_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Result"),
hash: Hash::new(0xecec15e1363240ac),
};
impl_static_type!(impl<T, E> Result<T, E> => RESULT_TYPE);
pub static OPTION_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Option"),
hash: Hash::new(0x5e08dc3f663c72db),
};
impl_static_type!(impl<T> Option<T> => OPTION_TYPE);
pub static FUNCTION_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Function"),
hash: Hash::new(0x45b788b02e7f231c),
};
impl_static_type!(crate::Function => FUNCTION_TYPE);
impl_static_type!(crate::Shared<crate::Function> => FUNCTION_TYPE);
impl_static_type!(impl<T> std::collections::HashMap<String, T> => OBJECT_TYPE);
pub static FORMAT_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Format"),
hash: Hash::new(0x8d6bddd19f58e97a),
};
impl_static_type!(crate::Format => FORMAT_TYPE);
pub static ITERATOR_TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Iterator"),
hash: Hash::new(0xe08fbd4d99f308e9),
};
impl_static_type!(crate::Iterator => ITERATOR_TYPE);
pub static TYPE: &StaticType = &StaticType {
name: RawStr::from_str("Type"),
hash: Hash::new(0x3cb9320f24bf56f0),
};