I used a macro to simplify C struct FFI declaration. Everything is ok but not when the struct contains a function pointer when I try to print it with debug trait.
Having the function pointer to be extern "stdcall" cause the following error:
But if I removed the calling convention, no more error:
This type uses #[repr(transparent)] to ensure the memory representation is exactly the same as the inner type, making it valid for C-ffi in exactly the same places as the inner type is. Additionally it implements Deref to make it easier to work with, as references to ImplDebug<F> automatically coerce to references to F.