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<AsyncStreamDeck, StreamDeckError>
pub fn connect( hidapi: &HidApi, kind: Kind, serial: &str ) -> Result<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
sourcepub async fn read_input(
&self,
poll_rate: f32
) -> Result<StreamDeckInput, StreamDeckError>
pub async fn read_input( &self, poll_rate: f32 ) -> Result<StreamDeckInput, StreamDeckError>
Reads button states, awaits until there’s data. Poll rate determines how often button state gets checked
sourcepub fn get_reader(&self) -> Arc<DeviceStateReader>
pub fn get_reader(&self) -> Arc<DeviceStateReader>
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: &'static [u8]
) -> Result<(), StreamDeckError>
pub async fn write_image( &self, key: u8, image_data: &'static [u8] ) -> Result<(), StreamDeckError>
Writes image data to Stream Deck device
sourcepub async fn write_lcd(
&self,
x: u16,
y: u16,
rect: &'static ImageRect
) -> Result<(), StreamDeckError>
pub async fn write_lcd( &self, x: u16, y: u16, rect: &'static ImageRect ) -> Result<(), StreamDeckError>
Writes image data to Stream Deck device’s lcd strip/screen
Writes image data to Stream Deck device
Sets specified button’s image
Trait Implementations§
source§impl Clone for AsyncStreamDeck
impl Clone for AsyncStreamDeck
source§fn clone(&self) -> AsyncStreamDeck
fn clone(&self) -> AsyncStreamDeck
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more