[−][src]Struct acpi_client::battery::BatteryInfo
Metadata pertaining to a battery.
Fields
name: String
The name used by ACPI to refer to the device.
remaining_capacity: u32
The charge remaining in the battery in units of mAh.
present_rate: u32
The rate at which the charge of the battery is changing in mA.
voltage: u32
The current voltage of the battery in mV.
design_capacity: u32
The charge available in the battery at the time of manufacture in units of mAh.
last_capacity: u32
The charge available in the battery at the last time the device was charged to full in units of mAh.
time_remaining: Duration
The time remaining until the battery reaches full charge or empty.
percentage: f32
The ratio of the remaining charge to the full charge.
state: ChargingState
The state of the battery's charging.
Methods
impl BatteryInfo
[src]
pub fn new(path: &Path) -> Result<BatteryInfo, AcpiClientError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for BatteryInfo
impl Send for BatteryInfo
impl Sync for BatteryInfo
impl Unpin for BatteryInfo
impl UnwindSafe for BatteryInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,