The external API for our project has a number of FFI functions containing callbacks. We were wondering if it was possible to give callback parameters meaningful names which would appear in our documentation.
For example, the following code with named callback parameters is valid:
#[no_mangle]
pub unsafe extern "C" fn app_account_info(
app: *mut App,
user_data: *mut c_void,
o_cb: extern "C" fn(user_data: *mut c_void, result: FfiResult, account_info: *const FfiAccountInfo),
)
Yet the parameter names are absent from the generated docs:
pub unsafe extern "C" fn app_account_info(
app: *mut App,
user_data: *mut c_void,
o_cb: extern "C" fn(_: *mut c_void, _: FfiResult, _: *const FfiAccountInfo)
)
I did some googling for this and failed to find anything relevant. Any ideas?