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

Method with_phys

src/uinput.rs:67–72  ·  view source on GitHub ↗

Set the device's physical location, e.g. `usb-00:01.2-2.1/input0`.

(self, path: &CStr)

Source from the content-addressed store, hash-verified

65
66 /// Set the device's physical location, e.g. `usb-00:01.2-2.1/input0`.
67 pub fn with_phys(self, path: &CStr) -> io::Result<Self> {
68 unsafe {
69 sys::ui_set_phys(self.fd.as_raw_fd(), path.as_ptr())?;
70 }
71 Ok(self)
72 }
73
74 /// Set the key codes that can be emitted by this device.
75 pub fn with_keys(self, keys: &AttributeSetRef<KeyCode>) -> io::Result<Self> {

Callers

nothing calls this directly

Calls 1

as_raw_fdMethod · 0.45

Tested by

no test coverage detected