Struct uhid_virt::UHIDDevice [−][src]
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]
params: CreateParams,
path: &Path
) -> Result<UHIDDevice<File>>
Auto Trait Implementations
impl<T> RefUnwindSafe for UHIDDevice<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for UHIDDevice<T> where
T: Send,
T: Send,
impl<T> Sync for UHIDDevice<T> where
T: Sync,
T: Sync,
impl<T> Unpin for UHIDDevice<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for UHIDDevice<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,