MCPcopy Create free account
hub / github.com/OpenActionAPI/rust-elgato-streamdeck / list_devices_async

Function list_devices_async

src/asynchronous.rs:26–28  ·  view source on GitHub ↗

Returns a list of devices as (Kind, Serial Number) that could be found using HidApi, can be safely ran inside [multi_thread](tokio::runtime::Builder::new_multi_thread) runtime WARNING:** To refresh the list, use [refresh_device_list]

(hidapi: &HidApi)

Source from the content-addressed store, hash-verified

24///
25/// **WARNING:** To refresh the list, use [refresh_device_list]
26pub fn list_devices_async(hidapi: &HidApi) -> Vec<(Kind, String)> {
27 block_in_place(move || list_devices(hidapi))
28}
29
30/// Stream Deck interface suitable to be used in async, uses [block_in_place](block_in_place)
31/// so this wrapper cannot be used in [current_thread](tokio::runtime::Builder::new_current_thread) runtimes

Callers

nothing calls this directly

Calls 1

list_devicesFunction · 0.85

Tested by

no test coverage detected