Struct rppal::system::DeviceInfo[][src]

pub struct DeviceInfo { /* fields omitted */ }

Retrieves Raspberry Pi device information.

Implementations

impl DeviceInfo[src]

pub fn new() -> Result<DeviceInfo>[src]

Constructs a new DeviceInfo.

new attempts to identify the Raspberry Pi's model and SoC based on the contents of /proc/cpuinfo, /sys/firmware/devicetree/base/compatible and /sys/firmware/devicetree/base/model.

pub fn model(&self) -> Model[src]

Returns the Raspberry Pi's model.

pub fn soc(&self) -> SoC[src]

Returns the Raspberry Pi's SoC.

Trait Implementations

impl Clone for DeviceInfo[src]

impl Copy for DeviceInfo[src]

impl Debug for DeviceInfo[src]

impl Eq for DeviceInfo[src]

impl PartialEq<DeviceInfo> for DeviceInfo[src]

impl StructuralEq for DeviceInfo[src]

impl StructuralPartialEq for DeviceInfo[src]

Auto Trait Implementations

impl RefUnwindSafe for DeviceInfo[src]

impl Send for DeviceInfo[src]

impl Sync for DeviceInfo[src]

impl Unpin for DeviceInfo[src]

impl UnwindSafe for DeviceInfo[src]

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.