MCPcopy Create free account
hub / github.com/emberian/evdev / update_switch_state

Method update_switch_state

src/raw_stream.rs:536–542  ·  view source on GitHub ↗
(
        &self,
        switch_vals: &mut AttributeSet<SwitchCode>,
    )

Source from the content-addressed store, hash-verified

534 /// [`get_switch_state`](Self::get_switch_state) instead.
535 #[inline]
536 pub fn update_switch_state(
537 &self,
538 switch_vals: &mut AttributeSet<SwitchCode>,
539 ) -> io::Result<()> {
540 unsafe { sys::eviocgsw(self.as_raw_fd(), switch_vals.as_mut_raw_slice())? };
541 Ok(())
542 }
543
544 /// Fetch the current kernel LED state directly into the provided buffer.
545 /// If you don't already have a buffer, you probably want

Callers 2

get_switch_stateMethod · 0.80
sync_stateMethod · 0.80

Calls 2

as_mut_raw_sliceMethod · 0.80
as_raw_fdMethod · 0.45

Tested by

no test coverage detected