Struct evdev_rs::UninitDevice[][src]

pub struct UninitDevice { /* fields omitted */ }

Opaque struct representing an evdev device with no backing file

Implementations

impl UninitDevice[src]

pub fn new() -> Option<UninitDevice>[src]

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.

pub fn set_file(self, file: File) -> Result<Device>[src]

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.

pub fn set_fd(self, file: File) -> Result<Device>[src]

👎 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

impl DeviceWrapper for UninitDevice[src]

impl Drop for UninitDevice[src]

impl Send for UninitDevice[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.