Skip to main content

register_handler

Function register_handler 

Source
pub fn register_handler<F>(handler: F) -> u64
where F: Fn(CallbackResult) + Send + Sync + 'static,
Expand description

Register a handler callback. The handler is executed immediately on the thread that calls invoke_callback with the returned ID. Use remove_callback(id) to unregister when no longer needed.