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

Function write_data

src/util.rs:39–41  ·  view source on GitHub ↗

Writes data to [HidDevice]

(device: &HidDevice, payload: &[u8])

Source from the content-addressed store, hash-verified

37
38/// Writes data to [HidDevice]
39pub fn write_data(device: &HidDevice, payload: &[u8]) -> Result<usize, HidError> {
40 device.write(payload)
41}
42
43/// Extracts string from byte array, removing \0 symbols
44pub fn extract_str(bytes: &[u8]) -> Result<String, Utf8Error> {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected