Skip to content

Instantly share code, notes, and snippets.

@jsgf
Created January 6, 2017 00:23
Show Gist options
  • Save jsgf/c0276dfe4a004ead79157a287eef4aa7 to your computer and use it in GitHub Desktop.
Save jsgf/c0276dfe4a004ead79157a287eef4aa7 to your computer and use it in GitHub Desktop.
/* automatically generated by rust-bindgen */
#[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() }
}
impl <T> ::std::marker::Copy for __BindgenUnionField<T> { }
impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
fmt.write_str("__BindgenUnionField")
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct std_allocator_traits<_Alloc> {
pub _address: u8,
pub _phantom_0: ::std::marker::PhantomData<_Alloc>,
}
pub type std_allocator_traits___size_type =
decltype(_S_size_type_helper((_Alloc *)0));
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct std__Vector_base<_Alloc> {
pub _Tp_alloc_type: __gnu_cxx___alloc_traits<_Alloc>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct std_vector<_Tp, _Alloc> {
pub _base: std__Vector_base<_Alloc>,
pub _phantom_0: ::std::marker::PhantomData<_Tp>,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct std_LogMessage {
pub _address: u8,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct std_LogMessage_ostrstream {
pub __bindgen_anon_1: std_LogMessage_ostrstream__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct std_LogMessage_ostrstream__bindgen_ty_1 {
pub outvec_: __BindgenUnionField<*mut std_vector<::std::os::raw::c_char,
::std::os::raw::c_char>>,
pub bindgen_union_field: u64,
}
#[test]
fn bindgen_test_layout_std_LogMessage_ostrstream__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<std_LogMessage_ostrstream__bindgen_ty_1>()
, 8usize);
assert_eq!(::std::mem::align_of::<std_LogMessage_ostrstream__bindgen_ty_1>()
, 8usize);
}
impl Clone for std_LogMessage_ostrstream__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_std_LogMessage_ostrstream() {
assert_eq!(::std::mem::size_of::<std_LogMessage_ostrstream>() , 8usize);
assert_eq!(::std::mem::align_of::<std_LogMessage_ostrstream>() , 8usize);
}
impl Clone for std_LogMessage_ostrstream {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_std_LogMessage() {
assert_eq!(::std::mem::size_of::<std_LogMessage>() , 1usize);
assert_eq!(::std::mem::align_of::<std_LogMessage>() , 1usize);
}
impl Clone for std_LogMessage {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __gnu_cxx___alloc_traits<_Alloc> {
pub _address: u8,
pub _phantom_0: ::std::marker::PhantomData<_Alloc>,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment