Function for_each_device

Source
pub fn for_each_device<F: FnMut(&DeviceHandle) + Send + 'static>(for_all: F)
Expand description

Runs a closure for all current and future input devices.

This function does two things:

  1. Runs for_all with all currently connected input devices, and
  2. Runs it with all newly connected devices.

Use this function for input device setup.