Function glib::source::fnmut_callback_wrapper
source ยท fn fnmut_callback_wrapper(
func: impl FnOnce() + Send + 'static,
) -> impl FnMut() -> ControlFlow + Send + 'static
Expand description
Transform a generic FnOnce into a closure that can be used as callback in various glib methods
The resulting function can only be called once and will panic otherwise. It will return ControlFlow::Break
in order to prevent being called twice.