pub type EventCallback = unsafe extern "C" fn(kind: EventKind, payload_ptr: *const c_void, user_ctx: *mut c_void);Expand description
Raw event callback. Identical Rust + C ABI; no_std + alloc-free.
The backend invokes this with the EventKind selecting which
payload-pointer variant is valid. user_ctx is opaque application
state passed at registration.
Lifetime. payload_ptr is valid for the duration of this call
only. Copy fields out before returning if needed beyond.
Threading. Invoked from inside drive_io on the executor
thread; do not block.
Safety contract. The callback is unsafe extern "C" fn:
implementors guarantee payload_ptr is non-null and points to a
valid payload of the variant selected by kind.