pub fn thread_register_callback<F, G>(f: F)where F: FnOnce(Option<Callback>) -> G, G: Fn(&mut Context, Event) + 'static,
Registers a callback in the thread-local context. This is a shortcut for accessing the Context via thread_access_with().
Context
thread_access_with()