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

Method with_msc

src/uinput.rs:197–215  ·  view source on GitHub ↗

Set the `MiscCode`s of this device.

(self, misc_set: &AttributeSetRef<MiscCode>)

Source from the content-addressed store, hash-verified

195
196 /// Set the `MiscCode`s of this device.
197 pub fn with_msc(self, misc_set: &AttributeSetRef<MiscCode>) -> io::Result<Self> {
198 unsafe {
199 sys::ui_set_evbit(
200 self.fd.as_raw_fd(),
201 crate::EventType::MISC.0 as nix::sys::ioctl::ioctl_param_type,
202 )?;
203 }
204
205 for bit in misc_set.iter() {
206 unsafe {
207 sys::ui_set_mscbit(
208 self.fd.as_raw_fd(),
209 bit.0 as nix::sys::ioctl::ioctl_param_type,
210 )?;
211 }
212 }
213
214 Ok(self)
215 }
216
217 /// Finalize and register this device.
218 ///

Callers

nothing calls this directly

Calls 2

iterMethod · 0.80
as_raw_fdMethod · 0.45

Tested by

no test coverage detected