pub struct DeviceNameFeature { /* private fields */ }Expand description
DeviceName feature implementation.
Implementations§
Source§impl DeviceNameFeature
impl DeviceNameFeature
Sourcepub fn new(device_index: u8, feature_index: u8) -> Self
pub fn new(device_index: u8, feature_index: u8) -> Self
Creates a new device name feature accessor.
§Arguments
device_index- Device index (0xFF for direct)feature_index- Feature index from root feature discovery
Sourcepub async fn get_name_length(&self, channel: &HidapiChannel) -> Result<u8>
pub async fn get_name_length(&self, channel: &HidapiChannel) -> Result<u8>
Gets the number of characters in the device name.
§Errors
Returns an error if HID++ communication fails or the device returns an error.
Sourcepub async fn get_name(&self, channel: &HidapiChannel) -> Result<String>
pub async fn get_name(&self, channel: &HidapiChannel) -> Result<String>
Gets the device name.
This may require multiple requests for long names.
§Errors
Returns an error if HID++ communication fails or the device returns an error.
Sourcepub async fn get_device_type(
&self,
channel: &HidapiChannel,
) -> Result<DeviceKind>
pub async fn get_device_type( &self, channel: &HidapiChannel, ) -> Result<DeviceKind>
Gets the device type.
Returns a device type code as defined by Logitech.
§Errors
Returns an error if HID++ communication fails or the device returns an error.
Auto Trait Implementations§
impl Freeze for DeviceNameFeature
impl RefUnwindSafe for DeviceNameFeature
impl Send for DeviceNameFeature
impl Sync for DeviceNameFeature
impl Unpin for DeviceNameFeature
impl UnwindSafe for DeviceNameFeature
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