Struct uhid_virt::UHIDDevice[][src]

pub struct UHIDDevice<T: Read + Write> { /* fields omitted */ }

Implementations

impl<T: Read + Write> UHIDDevice<T>[src]

Character misc-device handle for a specific HID device

pub fn write(&mut self, data: &[u8]) -> Result<usize>[src]

The data parameter should contain a data-payload. This is the raw data that you read from your device. The kernel will parse the HID reports.

pub fn read(&mut self) -> Result<OutputEvent, StreamError>[src]

Reads a queued output event. No reaction is required to an output event, but you should handle them according to your needs.

pub fn destroy(&mut self) -> Result<usize>[src]

This destroys the internal HID device. No further I/O will be accepted. There may still be pending output events that you can receive but no further input events can be sent to the kernel.

impl UHIDDevice<File>[src]

pub fn create(params: CreateParams) -> Result<UHIDDevice<File>>[src]

Opens the character misc-device at /dev/uhid

pub fn create_with_path(
    params: CreateParams,
    path: &Path
) -> Result<UHIDDevice<File>>
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for UHIDDevice<T> where
    T: RefUnwindSafe

impl<T> Send for UHIDDevice<T> where
    T: Send

impl<T> Sync for UHIDDevice<T> where
    T: Sync

impl<T> Unpin for UHIDDevice<T> where
    T: Unpin

impl<T> UnwindSafe for UHIDDevice<T> where
    T: UnwindSafe

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.