pub fn initialize_report_stream<InputDeviceProcessReportsFn>(
    device_proxy: InputDeviceProxy,
    device_descriptor: InputDeviceDescriptor,
    event_sender: UnboundedSender<InputEvent>,
    inspect_status: InputDeviceStatus,
    metrics_logger: MetricsLogger,
    process_reports: InputDeviceProcessReportsFn
)
where InputDeviceProcessReportsFn: 'static + Send + FnMut(InputReport, Option<InputReport>, &InputDeviceDescriptor, &mut UnboundedSender<InputEvent>, &InputDeviceStatus, &MetricsLogger) -> (Option<InputReport>, Option<UnboundedReceiver<InputEvent>>),
Expand description

Initializes the input report stream for the device bound to device_proxy.

Spawns a future which awaits input reports from the device and forwards them to clients via event_sender.

§Parameters

  • device_proxy: The device proxy which is used to get input reports.
  • device_descriptor: The descriptor of the device bound to device_proxy.
  • event_sender: The channel to send InputEvents to.
  • metrics_logger: The metrics logger.
  • process_reports: A function that generates InputEvent(s) from an InputReport and the InputReport that precedes it. Each type of input device defines how it processes InputReports.