[][src]Enum dmidecode::EntryPoint

pub enum EntryPoint {
    V2(EntryPointV2),
    V3(EntryPointV3),
}

Variants

V2(EntryPointV2)V3(EntryPointV3)

Methods

impl EntryPoint[src]

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

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

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

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

pub fn smbios_address(&self) -> u64[src]

pub fn smbios_len(&self) -> u32[src]

pub fn to_version(&self) -> SmbiosVersion[src]

Important traits for Structures<'buffer>
pub fn structures<'buffer>(&self, buffer: &'buffer [u8]) -> Structures<'buffer>[src]

Create an iterator across the SMBIOS structures found in buffer.

Example

use dmidecode::EntryPoint;
const DMIDECODE_BIN: &'static [u8] = include_bytes!("./test-data/dmidecode.bin");

let entry_point = EntryPoint::search(DMIDECODE_BIN)?;
for s in entry_point.structures(&DMIDECODE_BIN[entry_point.smbios_address() as usize..]) {
  let table = s?;
}
Ok(())

pub fn search(buffer: &[u8]) -> Result<EntryPoint, InvalidEntryPointError>[src]

Search for an instance of an SMBIOS EntryPoint in a memory buffer.

Example

use dmidecode::EntryPoint;

const ENTRY_BIN: &'static [u8] = include_bytes!("./test-data/entry.bin");

let entry_point = EntryPoint::search(ENTRY_BIN);

Errors

If this function fails to find a valid SMBIOS EntryPoint, it will return an InvalidEntryPointError variant.

Auto Trait Implementations

impl Send for EntryPoint

impl Sync for EntryPoint

Blanket Implementations

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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