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

Method get_reader

src/asynchronous.rs:182–190  ·  view source on GitHub ↗

Returns button state reader for this device

(&self)

Source from the content-addressed store, hash-verified

180
181 /// Returns button state reader for this device
182 pub fn get_reader(&self) -> Arc<AsyncDeviceStateReader> {
183 Arc::new(AsyncDeviceStateReader {
184 device: self.clone(),
185 states: Mutex::new(DeviceState {
186 buttons: vec![false; self.kind.key_count() as usize + self.kind.touchpoint_count() as usize],
187 encoders: vec![false; self.kind.encoder_count() as usize],
188 }),
189 })
190 }
191}
192
193/// Button reader that keeps state of the Stream Deck and returns events instead of full states

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected