pub struct EvDevDevice { /* private fields */ }Implementations§
Source§impl EvDevDevice
impl EvDevDevice
pub fn fd(&self) -> RawFd
pub fn info(&self) -> &EvDevDeviceInfo
pub fn name(&self) -> Option<&str>
Sourcepub fn event_types(&self) -> &[u16]
pub fn event_types(&self) -> &[u16]
The event types the device reports (ev_type).
pub fn abs_x(&self) -> Option<input_absinfo>
pub fn abs_y(&self) -> Option<input_absinfo>
Sourcepub fn open(device: &str) -> Result<Self>
pub fn open(device: &str) -> Result<Self>
Opens the device without blocking and reads what it is.
Sourcepub fn new(fd: OwnedFd) -> Result<Self>
pub fn new(fd: OwnedFd) -> Result<Self>
The device open on fd: reads its name, the event types it
reports and its absolute axes, which the reference’s constructor
asks libevdev for. Fails when the descriptor is not an event
device (its name cannot be read).
Sourcepub fn read_events(fd: RawFd) -> Vec<input_event>
pub fn read_events(fd: RawFd) -> Vec<input_event>
The events that can be read now, in order.
Auto Trait Implementations§
impl Freeze for EvDevDevice
impl RefUnwindSafe for EvDevDevice
impl Send for EvDevDevice
impl Sync for EvDevDevice
impl Unpin for EvDevDevice
impl UnsafeUnpin for EvDevDevice
impl UnwindSafe for EvDevDevice
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more