pub struct UninitDevice { /* private fields */ }
Expand description

Opaque struct representing an evdev device with no backing file

Implementations

Initialize a new libevdev device.

Generally you should use Device::new_from_file instead of this method This function only initializes the struct to sane default values. To actually hook up the device to a kernel device, use set_file.

Set the file for this struct and initialize internal data.

If the device changed and you need to re-read a device, use Device::new_from_file method. If you need to change the file after closing and re-opening the same device, use change_file.

👎Deprecated since 0.5.0: Prefer set_file. Some function names were changed so they more closely match their type signature. See issue 42 for discussion https://github.com/ndesh26/evdev-rs/issues/42

Trait Implementations

Formats the value using the given formatter. Read more
Forcibly enable an EventType/InputProp on this device, even if the underlying device does not support it. While this cannot make the device actually report such events, it will now return true for has(). Read more
Enables this property, a call to set_file will overwrite any previously set values Read more
Forcibly enable an event type on this device, even if the underlying device does not support it. While this cannot make the device actually report such events, it will now return true for libevdev_has_event_type(). Read more
Forcibly enable an event type on this device, even if the underlying device does not support it. While this cannot make the device actually report such events, it will now return true for libevdev_has_event_code(). Read more
Forcibly disable an EventType/EventCode on this device, even if the underlying device provides it. This effectively mutes the respective set of events. has() will return false for this EventType/EventCode Read more
Forcibly disable an event type on this device, even if the underlying device provides it. This effectively mutes the respective set of events. libevdev will filter any events matching this type and none will reach the caller. libevdev_has_event_type() will return false for this type. Read more
Forcibly disable an event code on this device, even if the underlying device provides it. This effectively mutes the respective set of events. libevdev will filter any events matching this type and code and none will reach the caller. has_event_code will return false for this code. Read more
Returns true if device support the InputProp/EventType/EventCode and false otherwise
Returns true if device support the property and false otherwise Read more
Returns true is the device support this event type and false otherwise Read more
Return true is the device support this event type and code and false otherwise Read more
Get device’s name, as set by the kernel, or overridden by a call to set_name
Get device’s physical location, as set by the kernel, or overridden by a call to set_phys
Get device’s unique identifier, as set by the kernel, or overridden by a call to set_uniq
Get the axis info for the given axis, as advertised by the kernel. Read more
Change the abs info for the given EV_ABS event code, if the code exists. Read more
Returns the current value of the event type. Read more
Set the value for a given event type and code. Read more
Return the current value of the code for the given slot. Read more
Set the value for a given code for the given slot. Read more
Get the number of slots supported by this device. Read more
Get the currently active slot. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.