This is how C API looks
void mosquitto_connect_callback_set(struct mosquitto *mosq, void (*on_connect)(struct mosquitto *, void *, int));
rust-bindgen
has generated this for me
pub fn mosquitto_connect_callback_set(mosq: *mut Struct_mosquitto,
on_connect:
::std::option::Option<extern "C" fn(arg1:
*mut Struct_mosquitto,
arg2:
*mut ::libc::c_void,
arg3:
::libc::c_int) -> ()>)
How do I create a rust callback function to pass to on_connect
parameter in the above rust binding?