Struct uinput_tokio::device::device::Device[][src]

pub struct Device { /* fields omitted */ }

The virtual device.

Implementations

impl Device[src]

pub fn new(file: File) -> Self[src]

Wrap a file descriptor in a Device.

pub async fn synchronize(&mut self) -> Result<(), Box<dyn Error>>[src]

Synchronize the device.

pub async fn send<T: Into<Event>>(
    &mut self,
    event: T,
    value: i32
) -> Result<(), Box<dyn Error>>
[src]

Send an event.

pub async fn press<T: Press>(&mut self, event: &T) -> Result<(), Box<dyn Error>>[src]

Send a press event.

pub async fn release<T: Release>(
    &mut self,
    event: &T
) -> Result<(), Box<dyn Error>>
[src]

Send a release event.

pub async fn click<T: Press + Release>(
    &mut self,
    event: &T
) -> Result<(), Box<dyn Error>>
[src]

Send a press and release event.

pub async fn position<T: Position>(
    &mut self,
    event: &T,
    value: i32
) -> Result<(), Box<dyn Error>>
[src]

Send a relative or absolute positioning event.

Trait Implementations

impl Drop for Device[src]

Auto Trait Implementations

impl !RefUnwindSafe for Device

impl Send for Device

impl Sync for Device

impl Unpin for Device

impl !UnwindSafe for Device

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.