sinf 0.1.0

Library for obtaining in-depth system information at both the hardware and software levels
Documentation
use crate::{Error, MotherboardInner};

/// Provides motherboard information.
pub struct Motherboard {
    pub(crate) inner: MotherboardInner,
}

impl Motherboard {
    /// Creates a `Motherboard` instance.
    pub fn new() -> Result<Self, Error> {
        Ok(Self {
            inner: MotherboardInner::new()?,
        })
    }

    /// Returns the motherboard name.
    pub fn name(&self) -> Option<String> {
        self.inner.name()
    }

    /// Returns the motherboard vendor name.
    pub fn vendor_name(&self) -> Option<String> {
        self.inner.vendor_name()
    }

    /// Returns the motherboard version.
    pub fn version(&self) -> Option<String> {
        self.inner.version()
    }

    /// Returns the motherboard serial number.
    pub fn serial_number(&self) -> Option<String> {
        self.inner.serial_number()
    }

    /// Returns the motherboard asset tag.
    pub fn asset_tag(&self) -> Option<String> {
        self.inner.asset_tag()
    }
}