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
|
/* automatically generated by rust-bindgen */
#![feature(const_fn)]
#![allow(non_snake_case)]
#[derive(Copy, Debug)]
#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl <T> __BindgenUnionField<T> {
#[inline]
pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) }
#[inline]
pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) }
#[inline]
pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) }
}
impl <T> ::std::default::Default for __BindgenUnionField<T> {
#[inline]
fn default() -> Self { Self::new() }
}
impl <T> ::std::clone::Clone for __BindgenUnionField<T> {
#[inline]
fn clone(&self) -> Self { Self::new() }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Struct_foo {
pub a: ::std::os::raw::c_uint,
pub foo_struct_with_nesting_h_unnamed_1: Union_foo_struct_with_nesting_h_unnamed_1,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Union_foo_struct_with_nesting_h_unnamed_1 {
pub b: __BindgenUnionField<::std::os::raw::c_uint>,
pub foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2: __BindgenUnionField<Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2>,
pub foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3: __BindgenUnionField<Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3>,
pub _bindgen_data_: u32,
}
impl Union_foo_struct_with_nesting_h_unnamed_1 {
pub unsafe fn b(&mut self) -> *mut ::std::os::raw::c_uint {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2(&mut self)
->
*mut Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
pub unsafe fn foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3(&mut self)
->
*mut Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3 {
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
::std::mem::transmute(raw.offset(0))
}
}
impl ::std::clone::Clone for Union_foo_struct_with_nesting_h_unnamed_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Union_foo_struct_with_nesting_h_unnamed_1() {
assert_eq!(::std::mem::size_of::<Union_foo_struct_with_nesting_h_unnamed_1>()
, 4usize);
assert_eq!(::std::mem::align_of::<Union_foo_struct_with_nesting_h_unnamed_1>()
, 4usize);
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2 {
pub c1: ::std::os::raw::c_ushort,
pub c2: ::std::os::raw::c_ushort,
}
impl ::std::clone::Clone for
Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2() {
assert_eq!(::std::mem::size_of::<Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2>()
, 4usize);
assert_eq!(::std::mem::align_of::<Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_2>()
, 2usize);
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3 {
pub d1: ::std::os::raw::c_uchar,
pub d2: ::std::os::raw::c_uchar,
pub d3: ::std::os::raw::c_uchar,
pub d4: ::std::os::raw::c_uchar,
}
impl ::std::clone::Clone for
Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3() {
assert_eq!(::std::mem::size_of::<Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3>()
, 4usize);
assert_eq!(::std::mem::align_of::<Struct_foo_struct_with_nesting_h_unnamed_1_struct_with_nesting_h_unnamed_3>()
, 1usize);
}
impl ::std::clone::Clone for Struct_foo {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Struct_foo() {
assert_eq!(::std::mem::size_of::<Struct_foo>() , 8usize);
assert_eq!(::std::mem::align_of::<Struct_foo>() , 4usize);
}
|