Struct smbioslib::WinSMBiosData[][src]

pub struct WinSMBiosData {
    pub smbios_data: SMBiosData,
    // some fields omitted
}

Raw SMBIOS Data

When Windows kernel32 GetSystemFirmwareTable function is called for RSMB, the raw SMBIOS table provider (‘RSMB’) it retrieves the contents of this raw SMBIOS firmware table structure.

Fields

smbios_data: SMBiosData

SMBios table data

Implementations

impl WinSMBiosData[src]

pub const USED20_CALLING_METHOD_OFFSET: usize[src]

Offset of the Used20CallingMethod field (0)

pub const SMBIOS_MAJOR_VERSION_OFFSET: usize[src]

Offset of the SMBIOSMajorVersion field (1)

pub const SMBIOS_MINOR_VERSION_OFFSET: usize[src]

Offset of the SMBIOSMinorVersion field (2)

pub const DMI_REVISION_OFFSET: usize[src]

Offset of the DMIRevision field (3)

pub const TABLE_DATA_LENGTH_OFFSET: usize[src]

Offset of the Length field (4)

pub const SMBIOS_TABLE_DATA_OFFSET: usize[src]

Offset of the SMBIOSTableData field (8)

pub fn new(raw_smbios_data: Vec<u8>) -> Result<WinSMBiosData, Error>[src]

Creates an instance of WinSMBiosData

To retrieve this structure on a windows system call load_windows_smbios_data().

The new() is provided publicly to allow loading data from other sources such as a file or from memory array as is done with testing.

pub fn is_valid_win_smbios_data(raw_data: &Vec<u8>) -> bool[src]

Verify if a block of data is a valid WinSMBiosData structure

This only checks if the structure itself is valid and not whether the contained SMBiosData structure is valid or not.

pub fn raw_smbios_data(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

The raw SMBIOS data this structure is wrapping

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

Used20CallingMethod

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

SMBIOS major version

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

SMBIOS minor version

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

DMI revision

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

Length of the smbios table data

Trait Implementations

impl Debug for WinSMBiosData[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Serialize for WinSMBiosData[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T

Notable traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T

Notable traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.