[−][src]Struct streamdeck::StreamDeck
StreamDeck object
Implementations
impl StreamDeck
[src]
pub fn connect(
vid: u16,
pid: u16,
serial: Option<String>
) -> Result<StreamDeck, Error>
[src]
vid: u16,
pid: u16,
serial: Option<String>
) -> Result<StreamDeck, Error>
Connect to a streamdeck device
pub fn kind(&self) -> Kind
[src]
Fetch the connected device kind
This can be used to retrieve related device information such as images sizes and modes
pub fn manufacturer(&mut self) -> Result<String, Error>
[src]
Fetch the device manufacturer string
pub fn product(&mut self) -> Result<String, Error>
[src]
Fetch the device product string
pub fn serial(&mut self) -> Result<String, Error>
[src]
Fetch the device serial
pub fn version(&mut self) -> Result<String, Error>
[src]
Fetch the device firmware version
pub fn reset(&mut self) -> Result<(), Error>
[src]
Reset the connected device
pub fn set_brightness(&mut self, brightness: u8) -> Result<(), Error>
[src]
Set the device display brightness (in percent)
pub fn set_blocking(&mut self, blocking: bool) -> Result<(), Error>
[src]
Set blocking mode
See: read_buttons
for discussion of this functionality
pub fn read_buttons(
&mut self,
timeout: Option<Duration>
) -> Result<Vec<u8>, Error>
[src]
&mut self,
timeout: Option<Duration>
) -> Result<Vec<u8>, Error>
Fetch button states
In blocking mode this will wait until a report packet has been received (or the specified timeout has elapsed). In non-blocking mode this will return immediately with a zero vector if no data is available
pub fn image_size(&self) -> (usize, usize)
[src]
Fetch image size for the connected device
pub fn set_button_rgb(&mut self, key: u8, colour: &Colour) -> Result<(), Error>
[src]
Set a button to the provided RGB colour
pub fn set_button_image(
&mut self,
key: u8,
image: DynamicImage
) -> Result<(), Error>
[src]
&mut self,
key: u8,
image: DynamicImage
) -> Result<(), Error>
Set a button to the provided image
pub fn set_button_file(
&mut self,
key: u8,
image: &str,
opts: &ImageOptions
) -> Result<(), Error>
[src]
&mut self,
key: u8,
image: &str,
opts: &ImageOptions
) -> Result<(), Error>
Set a button to the provided image file
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,