pub struct RawStructure<'buffer> {
    pub version: SmbiosVersion,
    pub info: InfoType,
    pub length: u8,
    pub handle: u16,
    pub data: &'buffer [u8],
    /* private fields */
}
Expand description

The raw SMBIOS structure information for structures that are not handled by this crate, such as Oem structures.

Fields

version: SmbiosVersioninfo: InfoTypelength: u8handle: u16data: &'buffer [u8]

Implementations

Find a string in the strings table by the string index. If the string index is 0, the empty string is returned. Otherwise, the string corresponding to that string index in the strings table is returned.

Errors

Returns a MalformedStructureError::InvalidStringIndex if the index is outside of the strings table.

Get value by offset declared in SMBIOS Reference Specification.
Type meaning data length is mandatory:

  • BYTE: u8
  • WORD: u16
  • DWORD: u32
  • QWORD: u64

The only error this method returned: MalformedStructureError::InvalidSlice (actually is core::array::TryFromSliceError). If getting value index exceedes length of Formatted section it may be ignored to return None value of structure field. In this case Formatted section length automatically hide non-existing values

Wrapper to self.data.get(..) with header offset correction

Get STRING by offset declared in SMBIOS Reference Specification

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.