pub struct DMITable {
pub bios: Bios,
pub system: System,
pub baseboard: Baseboard,
pub chassis: Chassis,
pub processor: Processor,
pub caches: Caches,
pub ports: PortConnectors,
pub mem_array: MemoryArray,
pub mem_devices: MemoryDevices,
}Expand description
A structure containing data from the DMI table
§Usage
use ferrix::dmi::DMITable;
let dmi = DMITable::new().unwrap();
dbg!(dmi);Fields§
§bios: BiosInformation about BIOS (Type 0)
system: SystemInformation about system (Type 1)
baseboard: BaseboardInformation about baseboard (or module) - Type 2
chassis: ChassisInformation about system enclosure or chassis - Type 3
processor: ProcessorInformation about processor - Type 4
caches: CachesInformation about CPU cache (Type 7)
ports: PortConnectorsInformation about port connectors (Type 8)
mem_array: MemoryArrayInformation about physical memory array (Type 16)
mem_devices: MemoryDevicesInformation about installed memory devices (Type 17)
Implementations§
Source§impl DMITable
impl DMITable
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Get information from DMI table
NOTE: This data DOES NOT NEED to be updated periodically!
Sourcepub fn to_json(&self) -> Result<String>
pub fn to_json(&self) -> Result<String>
Performs serialization of structure data in JSON.
The returned value will be a SINGLE LINE of JSON data intended for reading by third-party software or for transmission over the network.
Sourcepub fn to_json_pretty(&self) -> Result<String>
pub fn to_json_pretty(&self) -> Result<String>
Performs serialization in “pretty” JSON
JSON will contain unnecessary newline transitions and spaces to visually separate the blocks. It is well suited for human reading and analysis.
Trait Implementations§
Source§impl<'a> From<&'a DMITable> for DMITableXml<'a>
impl<'a> From<&'a DMITable> for DMITableXml<'a>
Auto Trait Implementations§
impl Freeze for DMITable
impl RefUnwindSafe for DMITable
impl Send for DMITable
impl Sync for DMITable
impl Unpin for DMITable
impl UnsafeUnpin for DMITable
impl UnwindSafe for DMITable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more