pub struct UnifiedBatteryFeature { /* private fields */ }Expand description
Unified Battery feature (0x1000) implementation.
Implementations§
Source§impl UnifiedBatteryFeature
impl UnifiedBatteryFeature
Sourcepub fn new(device_index: u8, feature_index: u8) -> Self
pub fn new(device_index: u8, feature_index: u8) -> Self
Creates a new Unified Battery feature accessor.
§Arguments
device_index- Device index (0xFF for direct)feature_index- Feature index from root feature discovery
Sourcepub async fn get_capabilities(&self, channel: &HidapiChannel) -> Result<u8>
pub async fn get_capabilities(&self, channel: &HidapiChannel) -> Result<u8>
Sourcepub async fn get_status(&self, channel: &HidapiChannel) -> Result<BatteryInfo>
pub async fn get_status(&self, channel: &HidapiChannel) -> Result<BatteryInfo>
Auto Trait Implementations§
impl Freeze for UnifiedBatteryFeature
impl RefUnwindSafe for UnifiedBatteryFeature
impl Send for UnifiedBatteryFeature
impl Sync for UnifiedBatteryFeature
impl Unpin for UnifiedBatteryFeature
impl UnwindSafe for UnifiedBatteryFeature
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