pub struct DeviceInformationFeature { /* private fields */ }Expand description
Implements the DeviceInformation / 0x0003 feature.
Implementations§
Source§impl DeviceInformationFeature
impl DeviceInformationFeature
Sourcepub async fn get_device_info(&self) -> Result<DeviceInformation, Hidpp20Error>
pub async fn get_device_info(&self) -> Result<DeviceInformation, Hidpp20Error>
Retrieves general information about the device and its capabilities.
Sourcepub async fn get_fw_info(
&self,
entity_index: u8,
) -> Result<DeviceEntityFirmwareInfo, Hidpp20Error>
pub async fn get_fw_info( &self, entity_index: u8, ) -> Result<DeviceEntityFirmwareInfo, Hidpp20Error>
Retrieves information about the firmware of a specific entity,
identified by its index bound by the value in
DeviceInformation::entity_count.
Sourcepub async fn get_serial_number(&self) -> Result<String, Hidpp20Error>
pub async fn get_serial_number(&self) -> Result<String, Hidpp20Error>
Retrieves the serial number of the device.
This function was added in feature version 4 and will likely result in
an v20::ErrorType::InvalidFunctionId error for older versions,
so DeviceInformationCapabilities::serial_number should be
verified before calling.
Trait Implementations§
Source§impl Clone for DeviceInformationFeature
impl Clone for DeviceInformationFeature
Source§fn clone(&self) -> DeviceInformationFeature
fn clone(&self) -> DeviceInformationFeature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CreatableFeature for DeviceInformationFeature
impl CreatableFeature for DeviceInformationFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for DeviceInformationFeature
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceInformationFeature
impl !UnwindSafe for DeviceInformationFeature
impl Freeze for DeviceInformationFeature
impl Send for DeviceInformationFeature
impl Sync for DeviceInformationFeature
impl Unpin for DeviceInformationFeature
impl UnsafeUnpin for DeviceInformationFeature
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