pub struct Device(/* private fields */);Implementations§
Source§impl Device
impl Device
Sourcepub fn get_feature_report<T>(&mut self, report_id: u8) -> Result<T>
pub fn get_feature_report<T>(&mut self, report_id: u8) -> Result<T>
Request a feature report using HIDIOCGFEATURE ioctl.
Sourcepub unsafe fn get_feature_report_with_size<T>(
&mut self,
report_id: u8,
size: usize,
) -> Result<T>
Available on crate feature unsafe_reports only.
pub unsafe fn get_feature_report_with_size<T>( &mut self, report_id: u8, size: usize, ) -> Result<T>
unsafe_reports only.Request a feature report using HIDIOCGFEATURE ioctl with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn get_input_report<T>(&mut self, report_id: u8) -> Result<T>
pub fn get_input_report<T>(&mut self, report_id: u8) -> Result<T>
Request an input report using HIDIOCGINPUT ioctl.
Sourcepub unsafe fn get_input_report_with_size<T>(
&mut self,
report_id: u8,
size: usize,
) -> Result<T>
Available on crate feature unsafe_reports only.
pub unsafe fn get_input_report_with_size<T>( &mut self, report_id: u8, size: usize, ) -> Result<T>
unsafe_reports only.Request an input report using HIDIOCGINPUT ioctl with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn get_input_report_read<T>(&mut self, report_id: u8) -> Result<T>
pub fn get_input_report_read<T>(&mut self, report_id: u8) -> Result<T>
Request an input report using read.
Sourcepub unsafe fn get_input_report_read_with_size<T>(
&mut self,
report_id: u8,
size: usize,
) -> Result<T>
Available on crate feature unsafe_reports only.
pub unsafe fn get_input_report_read_with_size<T>( &mut self, report_id: u8, size: usize, ) -> Result<T>
unsafe_reports only.Request an input report using read with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn get_output_report<T>(&mut self, report_id: u8) -> Result<T>
pub fn get_output_report<T>(&mut self, report_id: u8) -> Result<T>
Request an output report using HIDIOCGOUTPUT ioctl.
Sourcepub unsafe fn get_output_report_with_size<T>(
&mut self,
report_id: u8,
size: usize,
) -> Result<T>
Available on crate feature unsafe_reports only.
pub unsafe fn get_output_report_with_size<T>( &mut self, report_id: u8, size: usize, ) -> Result<T>
unsafe_reports only.Request an output report using HIDIOCGOUTPUT ioctl with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn get_physical_address(&mut self) -> Result<String>
pub fn get_physical_address(&mut self) -> Result<String>
pub fn get_raw_info(&mut self) -> Result<RawInfo>
pub fn get_raw_name(&mut self) -> Result<String>
Sourcepub fn get_raw_unique(&mut self) -> Result<String>
pub fn get_raw_unique(&mut self) -> Result<String>
Sourcepub fn get_report_descriptor(&mut self) -> Result<Vec<u8>>
pub fn get_report_descriptor(&mut self) -> Result<Vec<u8>>
Sourcepub fn send_feature_report<T>(&mut self, report: &T) -> Result<()>
pub fn send_feature_report<T>(&mut self, report: &T) -> Result<()>
Send a feature report using HIDIOCSFEATURE ioctl.
Sourcepub unsafe fn send_feature_report_with_size<T>(
&mut self,
report: &T,
size: usize,
) -> Result<()>
Available on crate feature unsafe_reports only.
pub unsafe fn send_feature_report_with_size<T>( &mut self, report: &T, size: usize, ) -> Result<()>
unsafe_reports only.Send a feature report using HIDIOCSFEATURE ioctl with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn send_input_report<T>(&mut self, report: &T) -> Result<()>
pub fn send_input_report<T>(&mut self, report: &T) -> Result<()>
Send an input report using HIDIOCSINPUT ioctl.
Sourcepub unsafe fn send_input_report_with_size<T>(
&mut self,
report: &T,
size: usize,
) -> Result<()>
Available on crate feature unsafe_reports only.
pub unsafe fn send_input_report_with_size<T>( &mut self, report: &T, size: usize, ) -> Result<()>
unsafe_reports only.Send an input report using HIDIOCSINPUT ioctl with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn send_output_report<T>(&mut self, report: &T) -> Result<()>
pub fn send_output_report<T>(&mut self, report: &T) -> Result<()>
Send an output report using HIDIOCSOUTPUT ioctl.
Sourcepub unsafe fn send_output_report_with_size<T>(
&mut self,
report: &T,
size: usize,
) -> Result<()>
Available on crate feature unsafe_reports only.
pub unsafe fn send_output_report_with_size<T>( &mut self, report: &T, size: usize, ) -> Result<()>
unsafe_reports only.Send an output report using HIDIOCSOUTPUT ioctl with specific size.
§Safety
Calling this function with size > size_of::<T>() is undefined behaviour.
Sourcepub fn send_output_report_write<T>(&mut self, report: &T) -> Result<()>
pub fn send_output_report_write<T>(&mut self, report: &T) -> Result<()>
Send an output report using write.