Battery monitoring via UPower D-Bus interface.
Quick Start
use BatteryService;
# async
Reactive Properties
All device properties are wrapped in Property<T>:
- Snapshot:
.get()returns the current value - Stream:
.watch()yields on every change
# use BatteryService;
# use StreamExt;
# async
DisplayDevice vs Specific Devices
By default, [BatteryService::new] monitors UPower's DisplayDevice - a composite
that aggregates all batteries. For specific device monitoring:
# use BatteryService;
use OwnedObjectPath;
# async
Control Methods
The Device type exposes UPower operations:
refresh- Force data refresh from hardwareget_history- Historical charge/rate dataget_statistics- Charge/discharge statisticsenable_charge_threshold- Battery charge limiting