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
sourceimpl 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
sourceimpl 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
Auto Trait Implementations
impl !RefUnwindSafe for AsyncStreamDeck
impl Send for AsyncStreamDeck
impl Sync for AsyncStreamDeck
impl Unpin for AsyncStreamDeck
impl UnwindSafe for AsyncStreamDeck
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more