[][src]Struct lpfs::proc::Apm

pub struct Apm { /* fields omitted */ }

Represent the content of /proc/apm, returnd by apm().

fields of this struct reference to apm_32.c

Methods

impl Apm[src]

pub fn driver_version(&self) -> &String[src]

pub fn bios_version(&self) -> &(u8, u8)[src]

pub fn bios_flag(&self) -> &u8[src]

pub fn ac_line_status(&self) -> &u8[src]

pub fn battery_status(&self) -> &u8[src]

pub fn battery_flag(&self) -> &u8[src]

pub fn remain_percent(&self) -> &Option<u8>[src]

return None if remaining percentage is unknown.

pub fn remain_time(&self) -> &Option<u64>[src]

return None if remaining time is unknown, or time units is seconds.

pub fn unit(&self) -> &String[src]

impl Apm[src]

pub fn remain_time_sec(&self) -> Option<u64>[src]

return remaining time in seconds.

Trait Implementations

impl Clone for Apm[src]

impl Debug for Apm[src]

impl FromStr for Apm[src]

type Err = ProcErr

The associated error which can be returned from parsing.

impl PartialEq<Apm> for Apm[src]

impl StructuralPartialEq for Apm[src]

Auto Trait Implementations

impl RefUnwindSafe for Apm

impl Send for Apm

impl Sync for Apm

impl Unpin for Apm

impl UnwindSafe for Apm

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.