Struct evdev_rs::UninitDevice [−][src]
Opaque struct representing an evdev device with no backing file
Implementations
impl UninitDevice
[src]
pub fn new() -> Option<UninitDevice>
[src]
Initialize a new libevdev device.
Generally you should use Device::new_from_file instead of this method
This function only initializes the struct to sane default values.
To actually hook up the device to a kernel device, use set_file
.
pub fn set_file(self, file: File) -> Result<Device>
[src]
Set the file for this struct and initialize internal data.
If the device changed and you need to re-read a device, use Device::new_from_file
method.
If you need to change the file after
closing and re-opening the same device, use change_file
.
pub fn set_fd(self, file: File) -> Result<Device>
[src]
Prefer set_file
. Some function names were changed so they
more closely match their type signature. See issue 42 for discussion
https://github.com/ndesh26/evdev-rs/issues/42
Trait Implementations
impl DeviceWrapper for UninitDevice
[src]
fn raw(&self) -> *mut libevdev
[src]
fn enable(&self, blob: &dyn Any) -> Result<()>
[src]
fn enable_property(&self, prop: &InputProp) -> Result<()>
[src]
fn enable_event_type(&self, ev_type: &EventType) -> Result<()>
[src]
fn enable_event_code(
&self,
ev_code: &EventCode,
blob: Option<&dyn Any>
) -> Result<()>
[src]
&self,
ev_code: &EventCode,
blob: Option<&dyn Any>
) -> Result<()>
fn disable(&self, blob: &dyn Any) -> Result<()>
[src]
fn disable_event_type(&self, ev_type: &EventType) -> Result<()>
[src]
fn disable_event_code(&self, code: &EventCode) -> Result<()>
[src]
fn has(&self, blob: &dyn Any) -> bool
[src]
fn has_property(&self, prop: &InputProp) -> bool
[src]
fn has_event_type(&self, ev_type: &EventType) -> bool
[src]
fn has_event_code(&self, code: &EventCode) -> bool
[src]
fn name(&self) -> Option<&str>
[src]
fn phys(&self) -> Option<&str>
[src]
fn uniq(&self) -> Option<&str>
[src]
fn set_name(&self, field: &str)
[src]
fn set_phys(&self, field: &str)
[src]
fn set_uniq(&self, field: &str)
[src]
fn product_id(&self) -> u16
[src]
fn vendor_id(&self) -> u16
[src]
fn bustype(&self) -> u16
[src]
fn version(&self) -> u16
[src]
fn set_product_id(&self, field: u16)
[src]
fn set_vendor_id(&self, field: u16)
[src]
fn set_bustype(&self, field: u16)
[src]
fn set_version(&self, field: u16)
[src]
fn abs_info(&self, code: &EventCode) -> Option<AbsInfo>
[src]
fn set_abs_info(&self, code: &EventCode, absinfo: &AbsInfo)
[src]
fn event_value(&self, code: &EventCode) -> Option<i32>
[src]
fn set_event_value(&self, code: &EventCode, val: i32) -> Result<()>
[src]
fn abs_minimum(&self, code: u32) -> Result<i32>
[src]
fn abs_maximum(&self, code: u32) -> Result<i32>
[src]
fn abs_fuzz(&self, code: u32) -> Result<i32>
[src]
fn abs_flat(&self, code: u32) -> Result<i32>
[src]
fn abs_resolution(&self, code: u32) -> Result<i32>
[src]
fn set_abs_minimum(&self, code: u32, val: i32)
[src]
fn set_abs_maximum(&self, code: u32, val: i32)
[src]
fn set_abs_fuzz(&self, code: u32, val: i32)
[src]
fn set_abs_flat(&self, code: u32, val: i32)
[src]
fn set_abs_resolution(&self, code: u32, val: i32)
[src]
fn slot_value(&self, slot: u32, code: &EventCode) -> Option<i32>
[src]
fn set_slot_value(&self, slot: u32, code: &EventCode, val: i32) -> Result<()>
[src]
fn num_slots(&self) -> Option<i32>
[src]
fn current_slot(&self) -> Option<i32>
[src]
impl Drop for UninitDevice
[src]
impl Send for UninitDevice
[src]
Auto Trait Implementations
impl RefUnwindSafe for UninitDevice
impl !Sync for UninitDevice
impl Unpin for UninitDevice
impl UnwindSafe for UninitDevice
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>,