Registry / utility / starship-battery

starship-battery

JSON →
library0.10.3rscratesunverified

Cross-platform information about the notebook batteries

# Cargo.toml [dependencies] starship-battery = "0.10.3"
INSTALL
IMPORT
SIG · STARSHIP-BATTERY
S
starship-battery
utilityrustv0.10.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BatteryManager
use starship_battery::BatteryManager;

Lists all batteries and their info.

use starship_battery::BatteryManager; fn main() { let manager = BatteryManager::new().unwrap(); for battery in manager.batteries().unwrap() { println!("Battery: {:?}", battery); } }
Debug
Known issues
gotchaMay not work on all platforms without proper permissions
fix
Run with elevated privileges on some systems
affects: >=0.10.0
Upgrade
Version history
0.10.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
starship-battery — cargo add starship-battery · libregistry