Struct elgato_streamdeck::asynchronous::AsyncStreamDeck
source · pub struct AsyncStreamDeck { /* private fields */ }Available on crate feature
async only.Expand description
Stream Deck interface suitable to be used in async
Implementations§
source§impl AsyncStreamDeck
impl AsyncStreamDeck
Static functions of the struct
sourcepub fn connect(
hidapi: &HidApi,
kind: Kind,
serial: &str
) -> Result<Arc<AsyncStreamDeck>, StreamDeckError>
pub fn connect( hidapi: &HidApi, kind: Kind, serial: &str ) -> Result<Arc<AsyncStreamDeck>, StreamDeckError>
Attempts to connect to the device
source§impl AsyncStreamDeck
impl AsyncStreamDeck
Instance methods of the struct
sourcepub async fn manufacturer(&self) -> Result<String, StreamDeckError>
pub async fn manufacturer(&self) -> Result<String, StreamDeckError>
Returns manufacturer string of the device
sourcepub async fn product(&self) -> Result<String, StreamDeckError>
pub async fn product(&self) -> Result<String, StreamDeckError>
Returns product string of the device
sourcepub async fn serial_number(&self) -> Result<String, StreamDeckError>
pub async fn serial_number(&self) -> Result<String, StreamDeckError>
Returns serial number of the device
sourcepub async fn firmware_version(&self) -> Result<String, StreamDeckError>
pub async fn firmware_version(&self) -> Result<String, StreamDeckError>
Returns firmware version of the StreamDeck
Reads button states, awaits until there’s data. Poll rate determines how often button state gets checked
sourcepub fn get_reader(self: &Arc<Self>) -> Arc<ButtonStateReader>
pub fn get_reader(self: &Arc<Self>) -> Arc<ButtonStateReader>
Returns button state reader for this device
sourcepub async fn reset(&self) -> Result<(), StreamDeckError>
pub async fn reset(&self) -> Result<(), StreamDeckError>
Resets the device
sourcepub async fn set_brightness(&self, percent: u8) -> Result<(), StreamDeckError>
pub async fn set_brightness(&self, percent: u8) -> Result<(), StreamDeckError>
Sets brightness of the device, value range is 0 - 100
sourcepub async fn write_image(
&self,
key: u8,
image_data: &[u8]
) -> Result<(), StreamDeckError>
pub async fn write_image( &self, key: u8, image_data: &[u8] ) -> Result<(), StreamDeckError>
Writes image data to Stream Deck device
Writes image data to Stream Deck device
Sets specified button’s image