Struct elgato_streamdeck::StreamDeck
source · pub struct StreamDeck { /* private fields */ }Expand description
Interface for a Stream Deck device
Implementations
sourceimpl 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
sourceimpl 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
Reads button states, empty vector if no data. Non-blocking if no timeout
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
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
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