[][src]Struct evdev_rs::UInputDevice

pub struct UInputDevice { /* fields omitted */ }

Opaque struct representing an evdev uinput device

Methods

impl UInputDevice[src]

pub fn create_from_device(device: &Device) -> Result<UInputDevice, Errno>[src]

Create a uinput device based on the given libevdev device.

The uinput device will be an exact copy of the libevdev device, minus the bits that uinput doesn't allow to be set.

pub fn devnode(&self) -> Option<&str>[src]

pub fn syspath(&self) -> Option<&str>[src]

pub fn fd(&self) -> Option<File>[src]

Return the file descriptor used to create this uinput device.

This is the fd pointing to /dev/uinput. This file descriptor may be used to write events that are emitted by the uinput device. Closing this file descriptor will destroy the uinput device.

pub fn write_event(&self, event: &InputEvent) -> Result<(), Errno>[src]

Post an event through the uinput device.

It is the caller's responsibility that any event sequence is terminated with an EV_SYN/SYN_REPORT/0 event. Otherwise, listeners on the device node will not see the events until the next EV_SYN event is posted.

Trait Implementations

impl Drop for UInputDevice[src]

Auto Trait Implementations

impl !Send for UInputDevice

impl !Sync for UInputDevice

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]