use std::ptr::NonNull; struct Opaque; #[repr(C)] pub struct Pointers { a: NonNull, b: NonNull, c: NonNull, d: NonNull>, e: NonNull>, f: NonNull>, g: Option>, h: Option>, i: Option>>, j: *const T, k: *mut T, } #[repr(C)] pub struct References<'a> { a: &'a Opaque, b: &'a mut Opaque, c: Option<&'a Opaque>, d: Option<&'a mut Opaque>, } #[no_mangle] pub extern "C" fn value_arg(arg: References<'static>) {} #[no_mangle] pub extern "C" fn mutltiple_args( arg: NonNull, foo: *mut Pointers, d: NonNull>, ) { } #[no_mangle] pub extern "C" fn ref_arg(arg: &Pointers) {} #[no_mangle] pub extern "C" fn mut_ref_arg(arg: &mut Pointers) {} #[no_mangle] pub extern "C" fn optional_ref_arg(arg: Option<&Pointers>) {} #[no_mangle] pub extern "C" fn optional_mut_ref_arg(arg: Option<&mut Pointers>) {} #[no_mangle] pub extern "C" fn nullable_const_ptr(arg: *const Pointers) {} #[no_mangle] pub extern "C" fn nullable_mut_ptr(arg: *mut Pointers) {}