Struct virtio_drivers::VirtIOInput
source · [−]pub struct VirtIOInput<'a> { /* private fields */ }
Expand description
Virtual human interface devices such as keyboards, mice and tablets.
An instance of the virtio device represents one such input device. Device behavior mirrors that of the evdev layer in Linux, making pass-through implementations on top of evdev easy.
Implementations
sourceimpl<'a> VirtIOInput<'a>
impl<'a> VirtIOInput<'a>
sourcepub fn new(header: &'static mut VirtIOHeader) -> Result<Self>
pub fn new(header: &'static mut VirtIOHeader) -> Result<Self>
Create a new VirtIO-Input driver.
sourcepub fn ack_interrupt(&mut self) -> bool
pub fn ack_interrupt(&mut self) -> bool
Acknowledge interrupt and process events.
sourcepub fn pop_pending_event(&mut self) -> Option<InputEvent>
pub fn pop_pending_event(&mut self) -> Option<InputEvent>
Pop the pending event.
sourcepub fn query_config_select(
&mut self,
select: InputConfigSelect,
subsel: u8,
out: &mut [u8]
) -> u8
pub fn query_config_select(
&mut self,
select: InputConfigSelect,
subsel: u8,
out: &mut [u8]
) -> u8
Query a specific piece of information by select
and subsel
, and write
result to out
, return the result size.
Auto Trait Implementations
impl<'a> RefUnwindSafe for VirtIOInput<'a>
impl<'a> Send for VirtIOInput<'a>
impl<'a> Sync for VirtIOInput<'a>
impl<'a> Unpin for VirtIOInput<'a>
impl<'a> !UnwindSafe for VirtIOInput<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more