Struct elgato_streamdeck::StreamDeck
source · pub struct StreamDeck { /* private fields */ }Expand description
Interface for a Stream Deck device
Implementations§
source§impl StreamDeck
impl StreamDeck
Static functions of the struct
sourcepub fn connect(
hidapi: &HidApi,
kind: Kind,
serial: &str
) -> Result<StreamDeck, StreamDeckError>
pub fn connect( hidapi: &HidApi, kind: Kind, serial: &str ) -> Result<StreamDeck, StreamDeckError>
Attempts to connect to the device
source§impl StreamDeck
impl StreamDeck
Instance methods of the struct
sourcepub fn manufacturer(&self) -> Result<String, StreamDeckError>
pub fn manufacturer(&self) -> Result<String, StreamDeckError>
Returns manufacturer string of the device
sourcepub fn product(&self) -> Result<String, StreamDeckError>
pub fn product(&self) -> Result<String, StreamDeckError>
Returns product string of the device
sourcepub fn serial_number(&self) -> Result<String, StreamDeckError>
pub fn serial_number(&self) -> Result<String, StreamDeckError>
Returns serial number of the device
sourcepub fn firmware_version(&self) -> Result<String, StreamDeckError>
pub fn firmware_version(&self) -> Result<String, StreamDeckError>
Returns firmware version of the StreamDeck
sourcepub fn read_input(
&self,
timeout: Option<Duration>
) -> Result<StreamDeckInput, StreamDeckError>
pub fn read_input( &self, timeout: Option<Duration> ) -> Result<StreamDeckInput, StreamDeckError>
Reads all possible input from Stream Deck device
sourcepub fn reset(&self) -> Result<(), StreamDeckError>
pub fn reset(&self) -> Result<(), StreamDeckError>
Resets the device
sourcepub fn set_brightness(&self, percent: u8) -> Result<(), StreamDeckError>
pub fn set_brightness(&self, percent: u8) -> Result<(), StreamDeckError>
Sets brightness of the device, value range is 0 - 100
sourcepub fn write_image(
&self,
key: u8,
image_data: &[u8]
) -> Result<(), StreamDeckError>
pub fn write_image( &self, key: u8, image_data: &[u8] ) -> Result<(), StreamDeckError>
Writes image data to Stream Deck device
sourcepub fn write_lcd(
&self,
x: u16,
y: u16,
rect: &ImageRect
) -> Result<(), StreamDeckError>
pub fn write_lcd( &self, x: u16, y: u16, rect: &ImageRect ) -> Result<(), StreamDeckError>
Writes image data to Stream Deck device’s lcd strip/screen
Sets button’s image to blank
Sets specified button’s image
Auto Trait Implementations§
impl !RefUnwindSafe for StreamDeck
impl Send for StreamDeck
impl !Sync for StreamDeck
impl Unpin for StreamDeck
impl !UnwindSafe for StreamDeck
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more