Struct virtio_drivers::device::input::InputEvent
source · #[repr(C)]pub struct InputEvent {
pub event_type: u16,
pub code: u16,
pub value: u32,
}Expand description
Both queues use the same virtio_input_event struct. type, code and value
are filled according to the Linux input layer (evdev) interface.
Fields§
§event_type: u16Event type.
code: u16Event code.
value: u32Event value.
Trait Implementations§
source§impl AsBytes for InputEventwhere
u16: AsBytes,
u32: AsBytes,
HasPadding<InputEvent, { _ }>: ShouldBe<{ _ }>,
impl AsBytes for InputEventwhere u16: AsBytes, u32: AsBytes, HasPadding<InputEvent, { _ }>: ShouldBe<{ _ }>,
source§fn as_bytes_mut(&mut self) -> &mut [u8]where
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8]where Self: FromBytes,
Gets the bytes of this value mutably. Read more
source§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl Clone for InputEvent
impl Clone for InputEvent
source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for InputEvent
impl Debug for InputEvent
source§impl Default for InputEvent
impl Default for InputEvent
source§fn default() -> InputEvent
fn default() -> InputEvent
Returns the “default value” for a type. Read more
source§impl FromBytes for InputEventwhere
u16: FromBytes,
u32: FromBytes,
impl FromBytes for InputEventwhere u16: FromBytes, u32: FromBytes,
source§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Creates an instance of
Self from zeroed bytes.source§fn new_box_zeroed() -> Box<Self, Global>where
Self: Sized,
fn new_box_zeroed() -> Box<Self, Global>where Self: Sized,
Creates a
Box<Self> from zeroed bytes. Read moreimpl Copy for InputEvent
Auto Trait Implementations§
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnwindSafe for InputEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more