facet_core/impls/internal/
ty.rs1use crate::{Def, Facet, Shape, ShapeBuilder, Type, UserType, VTableDirect, vtable_direct};
4
5unsafe impl Facet<'_> for Type {
7 const SHAPE: &'static Shape = &const {
8 const VTABLE: VTableDirect = vtable_direct!(Type => Debug,);
9
10 ShapeBuilder::for_sized::<Type>("Type")
11 .ty(Type::User(UserType::Opaque))
12 .def(Def::Scalar)
13 .vtable_direct(&VTABLE)
14 .copy()
15 .send()
16 .sync()
17 .build()
18 };
19}
20
21unsafe impl Facet<'_> for crate::PrimitiveType {
23 const SHAPE: &'static Shape = &const {
24 const VTABLE: VTableDirect = vtable_direct!(crate::PrimitiveType => Debug,);
25
26 ShapeBuilder::for_sized::<crate::PrimitiveType>("PrimitiveType")
27 .ty(Type::User(UserType::Opaque))
28 .def(Def::Scalar)
29 .vtable_direct(&VTABLE)
30 .copy()
31 .send()
32 .sync()
33 .build()
34 };
35}
36
37unsafe impl Facet<'_> for crate::NumericType {
39 const SHAPE: &'static Shape = &const {
40 const VTABLE: VTableDirect = vtable_direct!(crate::NumericType => Debug,);
41
42 ShapeBuilder::for_sized::<crate::NumericType>("NumericType")
43 .ty(Type::User(UserType::Opaque))
44 .def(Def::Scalar)
45 .vtable_direct(&VTABLE)
46 .copy()
47 .send()
48 .sync()
49 .build()
50 };
51}
52
53unsafe impl Facet<'_> for crate::TextualType {
55 const SHAPE: &'static Shape = &const {
56 const VTABLE: VTableDirect = vtable_direct!(crate::TextualType => Debug,);
57
58 ShapeBuilder::for_sized::<crate::TextualType>("TextualType")
59 .ty(Type::User(UserType::Opaque))
60 .def(Def::Scalar)
61 .vtable_direct(&VTABLE)
62 .copy()
63 .send()
64 .sync()
65 .build()
66 };
67}
68
69unsafe impl Facet<'_> for crate::SequenceType {
71 const SHAPE: &'static Shape = &const {
72 const VTABLE: VTableDirect = vtable_direct!(crate::SequenceType => Debug,);
73
74 ShapeBuilder::for_sized::<crate::SequenceType>("SequenceType")
75 .ty(Type::User(UserType::Opaque))
76 .def(Def::Scalar)
77 .vtable_direct(&VTABLE)
78 .copy()
79 .send()
80 .sync()
81 .build()
82 };
83}
84
85unsafe impl Facet<'_> for crate::ArrayType {
87 const SHAPE: &'static Shape = &const {
88 const VTABLE: VTableDirect = vtable_direct!(crate::ArrayType => Debug,);
89
90 ShapeBuilder::for_sized::<crate::ArrayType>("ArrayType")
91 .ty(Type::User(UserType::Opaque))
92 .def(Def::Scalar)
93 .vtable_direct(&VTABLE)
94 .copy()
95 .send()
96 .sync()
97 .build()
98 };
99}
100
101unsafe impl Facet<'_> for crate::SliceType {
103 const SHAPE: &'static Shape = &const {
104 const VTABLE: VTableDirect = vtable_direct!(crate::SliceType => Debug,);
105
106 ShapeBuilder::for_sized::<crate::SliceType>("SliceType")
107 .ty(Type::User(UserType::Opaque))
108 .def(Def::Scalar)
109 .vtable_direct(&VTABLE)
110 .copy()
111 .send()
112 .sync()
113 .build()
114 };
115}
116
117unsafe impl Facet<'_> for crate::UserType {
119 const SHAPE: &'static Shape = &const {
120 const VTABLE: VTableDirect = vtable_direct!(crate::UserType => Debug,);
121
122 ShapeBuilder::for_sized::<crate::UserType>("UserType")
123 .ty(Type::User(UserType::Opaque))
124 .def(Def::Scalar)
125 .vtable_direct(&VTABLE)
126 .copy()
127 .send()
128 .sync()
129 .build()
130 };
131}
132
133unsafe impl Facet<'_> for crate::StructType {
135 const SHAPE: &'static Shape = &const {
136 const VTABLE: VTableDirect = vtable_direct!(crate::StructType => Debug,);
137
138 ShapeBuilder::for_sized::<crate::StructType>("StructType")
139 .ty(Type::User(UserType::Opaque))
140 .def(Def::Scalar)
141 .vtable_direct(&VTABLE)
142 .copy()
143 .send()
144 .sync()
145 .build()
146 };
147}
148
149unsafe impl Facet<'_> for crate::EnumType {
151 const SHAPE: &'static Shape = &const {
152 const VTABLE: VTableDirect = vtable_direct!(crate::EnumType => Debug,);
153
154 ShapeBuilder::for_sized::<crate::EnumType>("EnumType")
155 .ty(Type::User(UserType::Opaque))
156 .def(Def::Scalar)
157 .vtable_direct(&VTABLE)
158 .copy()
159 .send()
160 .sync()
161 .build()
162 };
163}
164
165unsafe impl Facet<'_> for crate::UnionType {
167 const SHAPE: &'static Shape = &const {
168 const VTABLE: VTableDirect = vtable_direct!(crate::UnionType => Debug,);
169
170 ShapeBuilder::for_sized::<crate::UnionType>("UnionType")
171 .ty(Type::User(UserType::Opaque))
172 .def(Def::Scalar)
173 .vtable_direct(&VTABLE)
174 .copy()
175 .send()
176 .sync()
177 .build()
178 };
179}
180
181unsafe impl Facet<'_> for crate::PointerType {
183 const SHAPE: &'static Shape = &const {
184 const VTABLE: VTableDirect = vtable_direct!(crate::PointerType => Debug,);
185
186 ShapeBuilder::for_sized::<crate::PointerType>("PointerType")
187 .ty(Type::User(UserType::Opaque))
188 .def(Def::Scalar)
189 .vtable_direct(&VTABLE)
190 .copy()
191 .send()
192 .sync()
193 .build()
194 };
195}
196
197unsafe impl Facet<'_> for crate::ValuePointerType {
199 const SHAPE: &'static Shape = &const {
200 const VTABLE: VTableDirect = vtable_direct!(crate::ValuePointerType => Debug,);
201
202 ShapeBuilder::for_sized::<crate::ValuePointerType>("ValuePointerType")
203 .ty(Type::User(UserType::Opaque))
204 .def(Def::Scalar)
205 .vtable_direct(&VTABLE)
206 .copy()
207 .send()
208 .sync()
209 .build()
210 };
211}
212
213unsafe impl Facet<'_> for crate::FunctionPointerDef {
215 const SHAPE: &'static Shape = &const {
216 const VTABLE: VTableDirect = vtable_direct!(crate::FunctionPointerDef => Debug,);
217
218 ShapeBuilder::for_sized::<crate::FunctionPointerDef>("FunctionPointerDef")
219 .ty(Type::User(UserType::Opaque))
220 .def(Def::Scalar)
221 .vtable_direct(&VTABLE)
222 .copy()
223 .send()
224 .sync()
225 .build()
226 };
227}
228
229unsafe impl Facet<'_> for crate::Repr {
231 const SHAPE: &'static Shape = &const {
232 const VTABLE: VTableDirect = vtable_direct!(crate::Repr => Debug, Hash, PartialEq,);
233
234 ShapeBuilder::for_sized::<crate::Repr>("Repr")
235 .ty(Type::User(UserType::Opaque))
236 .def(Def::Scalar)
237 .vtable_direct(&VTABLE)
238 .copy()
239 .send()
240 .sync()
241 .eq()
242 .build()
243 };
244}
245
246unsafe impl Facet<'_> for crate::BaseRepr {
248 const SHAPE: &'static Shape = &const {
249 const VTABLE: VTableDirect = vtable_direct!(crate::BaseRepr => Debug, Hash, PartialEq,);
250
251 ShapeBuilder::for_sized::<crate::BaseRepr>("BaseRepr")
252 .ty(Type::User(UserType::Opaque))
253 .def(Def::Scalar)
254 .vtable_direct(&VTABLE)
255 .copy()
256 .send()
257 .sync()
258 .eq()
259 .build()
260 };
261}