Attempts to connect to the device, can be safely ran inside [multi_thread](tokio::runtime::Builder::new_multi_thread) runtime
(hidapi: &HidApi, kind: Kind, serial: &str)
| 39 | impl AsyncStreamDeck { |
| 40 | /// Attempts to connect to the device, can be safely ran inside [multi_thread](tokio::runtime::Builder::new_multi_thread) runtime |
| 41 | pub fn connect(hidapi: &HidApi, kind: Kind, serial: &str) -> Result<AsyncStreamDeck, StreamDeckError> { |
| 42 | let device = block_in_place(move || StreamDeck::connect(hidapi, kind, serial))?; |
| 43 | |
| 44 | Ok(AsyncStreamDeck { |
| 45 | kind, |
| 46 | device: Arc::new(Mutex::new(device)), |
| 47 | }) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | impl From<StreamDeck> for AsyncStreamDeck { |
nothing calls this directly
no outgoing calls
no test coverage detected