#[repr(C)] pub struct Point { pub x: T, pub y: T, } #[repr(u8)] pub enum Foo { Foo { x: i32, y: Point, z: Point, }, Bar(T), Baz(Point), Bazz, } #[repr(C)] pub enum Bar { Bar1 { x: i32, y: Point, z: Point, u: unsafe extern "C" fn(i32) -> i32, }, Bar2(T), Bar3(Point), Bar4, } #[repr(u8)] pub enum Baz { Baz1(Bar), Baz2(Point), Baz3, } #[repr(C, u8)] pub enum Taz { Taz1(Bar), Taz2(Baz), Taz3, } #[no_mangle] pub extern "C" fn foo( foo: *const Foo, bar: *const Bar, baz: *const Baz, taz: *const Taz, ) {}