MCPcopy Create free account
hub / github.com/OpenActionAPI/rust-elgato-streamdeck / get_reader

Method get_reader

src/lib.rs:475–484  ·  view source on GitHub ↗

Returns button state reader for this device

(self: &Arc<Self>)

Source from the content-addressed store, hash-verified

473
474 /// Returns button state reader for this device
475 pub fn get_reader(self: &Arc<Self>) -> Arc<DeviceStateReader> {
476 #[allow(clippy::arc_with_non_send_sync)]
477 Arc::new(DeviceStateReader {
478 device: self.clone(),
479 states: Mutex::new(DeviceState {
480 buttons: vec![false; self.kind.key_count() as usize + self.kind.touchpoint_count() as usize],
481 encoders: vec![false; self.kind.encoder_count() as usize],
482 }),
483 })
484 }
485
486 fn write_image_data_reports<T>(&self, image_data: &[u8], parameters: WriteImageParameters, header_fn: T) -> Result<(), StreamDeckError>
487 where

Callers 2

mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected