pub fn key_for_each<F>(&self, closure: F)
    where
        F: FnMut(&Keymap, Keycode),
    {
        let data_box = Box::new((self, closure));
        let data_ptr = Box::into_raw(data_box).cast();

        unsafe {
            ffi::xkb_keymap_key_for_each(self.get_raw_ptr(), Self::callback::<F>, data_ptr);
            mem::drop(Box::from_raw(data_ptr.cast::<(&Keymap, F)>()));
        }
    }
/// Run a specified closure for every valid keycode in the keymap.
Run a specified closure for every valid keycode in the keymap.
Run a specified closure for every valid keycode in the keymap .
pub fn key_for_each<F>(&self, closure: F)
    where
        F: FnMut(&Keymap, Keycode),
    {
        let data_box = Box::new((self, closure));
        let data_ptr = Box::into_raw(data_box).cast();
        unsafe {
            ffi::xkb_keymap_key_for_each(self.get_raw_ptr(), Self::callback::<F>, data_ptr);
            mem::drop(Box::from_raw(data_ptr.cast::<(&Keymap, F)>()));
        }
    }
pub fn key_for_each < F > ( & self , closure : F ) where F : FnMut ( & Keymap , Keycode ) , { let data_box = Box :: new ( ( self , closure ) ) ; let data_ptr = Box :: into_raw ( data_box ) . cast ( ) ; unsafe { ffi :: xkb_keymap_key_for_each ( self . get_raw_ptr ( ) , Self :: callback :: < F > , data_ptr ) ; mem :: drop ( Box :: from_raw ( data_ptr . cast :: < ( & Keymap , F ) > ( ) ) ) ; } }
Run a specified closure for every valid keycode in the keymap.
Run a specified closure for every valid keycode in the keymap .
&self
closure
F
&self
closure
F