1 #![allow(
2 dead_code,
3 non_snake_case,
4 non_camel_case_types,
5 non_upper_case_globals
6 )]
7
8 #[repr(C)]
9 pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
10 impl<T> __BindgenUnionField<T> {
11 #[inline]
new() -> Self12 pub fn new() -> Self {
13 __BindgenUnionField(::std::marker::PhantomData)
14 }
15 #[inline]
as_ref(&self) -> &T16 pub unsafe fn as_ref(&self) -> &T {
17 ::std::mem::transmute(self)
18 }
19 #[inline]
as_mut(&mut self) -> &mut T20 pub unsafe fn as_mut(&mut self) -> &mut T {
21 ::std::mem::transmute(self)
22 }
23 }
24 impl<T> ::std::default::Default for __BindgenUnionField<T> {
25 #[inline]
default() -> Self26 fn default() -> Self {
27 Self::new()
28 }
29 }
30 impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
31 #[inline]
clone(&self) -> Self32 fn clone(&self) -> Self {
33 Self::new()
34 }
35 }
36 impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
37 impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result38 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39 fmt.write_str("__BindgenUnionField")
40 }
41 }
42 impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
hash<H: ::std::hash::Hasher>(&self, _state: &mut H)43 fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
44 }
45 impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
eq(&self, _other: &__BindgenUnionField<T>) -> bool46 fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
47 true
48 }
49 }
50 impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
51 #[repr(C)]
52 #[derive(Debug, Copy, Clone)]
53 pub struct StylePoint<T> {
54 pub x: T,
55 pub y: T,
56 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
57 }
58 impl<T> Default for StylePoint<T> {
default() -> Self59 fn default() -> Self {
60 unsafe {
61 let mut s: Self = ::std::mem::uninitialized();
62 ::std::ptr::write_bytes(&mut s, 0, 1);
63 s
64 }
65 }
66 }
67 #[repr(C)]
68 #[derive(Debug, Default, Copy, Clone)]
69 pub struct StyleFoo<T> {
70 pub __bindgen_anon_1: __BindgenUnionField<StyleFoo__bindgen_ty_1>,
71 pub foo: __BindgenUnionField<StyleFoo_Foo_Body<T>>,
72 pub bar: __BindgenUnionField<StyleFoo_Bar_Body<T>>,
73 pub baz: __BindgenUnionField<StyleFoo_Baz_Body<T>>,
74 pub bindgen_union_field: [u8; 0usize],
75 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
76 }
77 pub const StyleFoo_Tag_Foo: StyleFoo_Tag = 0;
78 pub const StyleFoo_Tag_Bar: StyleFoo_Tag = 0;
79 pub const StyleFoo_Tag_Baz: StyleFoo_Tag = 0;
80 pub const StyleFoo_Tag_Bazz: StyleFoo_Tag = 0;
81 pub type StyleFoo_Tag = u8;
82 #[repr(C)]
83 #[derive(Debug, Copy, Clone)]
84 pub struct StyleFoo_Foo_Body<T> {
85 pub tag: StyleFoo_Tag,
86 pub x: i32,
87 pub y: StylePoint<T>,
88 pub z: StylePoint<f32>,
89 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
90 }
91 impl<T> Default for StyleFoo_Foo_Body<T> {
default() -> Self92 fn default() -> Self {
93 unsafe {
94 let mut s: Self = ::std::mem::uninitialized();
95 ::std::ptr::write_bytes(&mut s, 0, 1);
96 s
97 }
98 }
99 }
100 #[repr(C)]
101 #[derive(Debug, Copy, Clone)]
102 pub struct StyleFoo_Bar_Body<T> {
103 pub tag: StyleFoo_Tag,
104 pub _0: T,
105 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
106 }
107 impl<T> Default for StyleFoo_Bar_Body<T> {
default() -> Self108 fn default() -> Self {
109 unsafe {
110 let mut s: Self = ::std::mem::uninitialized();
111 ::std::ptr::write_bytes(&mut s, 0, 1);
112 s
113 }
114 }
115 }
116 #[repr(C)]
117 #[derive(Debug, Copy, Clone)]
118 pub struct StyleFoo_Baz_Body<T> {
119 pub tag: StyleFoo_Tag,
120 pub _0: StylePoint<T>,
121 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
122 }
123 impl<T> Default for StyleFoo_Baz_Body<T> {
default() -> Self124 fn default() -> Self {
125 unsafe {
126 let mut s: Self = ::std::mem::uninitialized();
127 ::std::ptr::write_bytes(&mut s, 0, 1);
128 s
129 }
130 }
131 }
132 #[repr(C)]
133 #[derive(Debug, Copy, Clone)]
134 pub struct StyleFoo__bindgen_ty_1 {
135 pub tag: StyleFoo_Tag,
136 }
137 impl Default for StyleFoo__bindgen_ty_1 {
default() -> Self138 fn default() -> Self {
139 unsafe {
140 let mut s: Self = ::std::mem::uninitialized();
141 ::std::ptr::write_bytes(&mut s, 0, 1);
142 s
143 }
144 }
145 }
146 #[repr(C)]
147 #[derive(Debug, Copy, Clone)]
148 pub struct StyleBar<T> {
149 pub tag: StyleBar_Tag,
150 pub __bindgen_anon_1: StyleBar__bindgen_ty_1<T>,
151 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
152 }
153 pub const StyleBar_Tag_Bar1: StyleBar_Tag = 0;
154 pub const StyleBar_Tag_Bar2: StyleBar_Tag = 0;
155 pub const StyleBar_Tag_Bar3: StyleBar_Tag = 0;
156 pub const StyleBar_Tag_Bar4: StyleBar_Tag = 0;
157 pub type StyleBar_Tag = ::std::os::raw::c_int;
158 #[repr(C)]
159 #[derive(Debug, Copy, Clone)]
160 pub struct StyleBar_StyleBar1_Body<T> {
161 pub x: i32,
162 pub y: StylePoint<T>,
163 pub z: StylePoint<f32>,
164 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
165 }
166 impl<T> Default for StyleBar_StyleBar1_Body<T> {
default() -> Self167 fn default() -> Self {
168 unsafe {
169 let mut s: Self = ::std::mem::uninitialized();
170 ::std::ptr::write_bytes(&mut s, 0, 1);
171 s
172 }
173 }
174 }
175 #[repr(C)]
176 #[derive(Debug, Copy, Clone)]
177 pub struct StyleBar_StyleBar2_Body<T> {
178 pub _0: T,
179 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
180 }
181 impl<T> Default for StyleBar_StyleBar2_Body<T> {
default() -> Self182 fn default() -> Self {
183 unsafe {
184 let mut s: Self = ::std::mem::uninitialized();
185 ::std::ptr::write_bytes(&mut s, 0, 1);
186 s
187 }
188 }
189 }
190 #[repr(C)]
191 #[derive(Debug, Copy, Clone)]
192 pub struct StyleBar_StyleBar3_Body<T> {
193 pub _0: StylePoint<T>,
194 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
195 }
196 impl<T> Default for StyleBar_StyleBar3_Body<T> {
default() -> Self197 fn default() -> Self {
198 unsafe {
199 let mut s: Self = ::std::mem::uninitialized();
200 ::std::ptr::write_bytes(&mut s, 0, 1);
201 s
202 }
203 }
204 }
205 #[repr(C)]
206 #[derive(Debug, Default, Copy, Clone)]
207 pub struct StyleBar__bindgen_ty_1<T> {
208 pub bar1: __BindgenUnionField<StyleBar_StyleBar1_Body<T>>,
209 pub bar2: __BindgenUnionField<StyleBar_StyleBar2_Body<T>>,
210 pub bar3: __BindgenUnionField<StyleBar_StyleBar3_Body<T>>,
211 pub bindgen_union_field: [u8; 0usize],
212 pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
213 }
214 impl<T> Default for StyleBar<T> {
default() -> Self215 fn default() -> Self {
216 unsafe {
217 let mut s: Self = ::std::mem::uninitialized();
218 ::std::ptr::write_bytes(&mut s, 0, 1);
219 s
220 }
221 }
222 }
223 #[test]
__bindgen_test_layout_StylePoint_open0_float_close0_instantiation()224 fn __bindgen_test_layout_StylePoint_open0_float_close0_instantiation() {
225 assert_eq!(
226 ::std::mem::size_of::<StylePoint<f32>>(),
227 8usize,
228 concat!(
229 "Size of template specialization: ",
230 stringify!(StylePoint<f32>)
231 )
232 );
233 assert_eq!(
234 ::std::mem::align_of::<StylePoint<f32>>(),
235 4usize,
236 concat!(
237 "Alignment of template specialization: ",
238 stringify!(StylePoint<f32>)
239 )
240 );
241 }
242 #[test]
__bindgen_test_layout_StylePoint_open0_float_close0_instantiation_1()243 fn __bindgen_test_layout_StylePoint_open0_float_close0_instantiation_1() {
244 assert_eq!(
245 ::std::mem::size_of::<StylePoint<f32>>(),
246 8usize,
247 concat!(
248 "Size of template specialization: ",
249 stringify!(StylePoint<f32>)
250 )
251 );
252 assert_eq!(
253 ::std::mem::align_of::<StylePoint<f32>>(),
254 4usize,
255 concat!(
256 "Alignment of template specialization: ",
257 stringify!(StylePoint<f32>)
258 )
259 );
260 }
261