async fn all_keyboard_bindings() -> Result<Vec<KeyboardBinding>, Error> {
    let device_proxies = input_device::all_devices(input_device::InputDeviceType::Keyboard).await?;
    let mut device_bindings: Vec<KeyboardBinding> = vec![];

    for device_proxy in device_proxies {
        let device_binding: KeyboardBinding =
            input_device::InputDeviceBinding::new(device_proxy).await?;
        device_bindings.push(device_binding);
    }

    Ok(device_bindings)
}
/// Returns a vector of [`KeyboardBindings`] for all currently connected keyboards.
///
/// # Errors
/// If there was an error binding to any keyboard.
Returns a vector of [`KeyboardBindings`] for all currently connected keyboards.
Returns a vector of [ ` KeyboardBindings ` ] for all currently connected keyboards .
async fn all_keyboard_bindings() -> Result<Vec<KeyboardBinding>, Error> {
    let device_proxies = input_device::all_devices(input_device::InputDeviceType::Keyboard).await?;
    let mut device_bindings: Vec<KeyboardBinding> = vec![];
    for device_proxy in device_proxies {
        let device_binding: KeyboardBinding =
            input_device::InputDeviceBinding::new(device_proxy).await?;
        device_bindings.push(device_binding);
    }
    Ok(device_bindings)
}
async fn all_keyboard_bindings ( ) -> Result < Vec < KeyboardBinding > , Error > { let device_proxies = input_device :: all_devices ( input_device :: InputDeviceType :: Keyboard ) . await ? ; let mut device_bindings : Vec < KeyboardBinding > = vec ! [ ] ; for device_proxy in device_proxies { let device_binding : KeyboardBinding = input_device :: InputDeviceBinding :: new ( device_proxy ) . await ? ; device_bindings . push ( device_binding ) ; } Ok ( device_bindings ) }
Returns a vector of [`KeyboardBindings`] for all currently connected keyboards.
Returns a vector of [ ` KeyboardBindings ` ] for all currently connected keyboards .
errors
If there was an error binding to any keyboard.
If there was an error binding to any keyboard .