Struct smbioslib::WinSMBiosData
source · [−]pub struct WinSMBiosData {
pub smbios_data: SMBiosData,
/* private fields */
}
Expand description
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
sourceimpl WinSMBiosData
impl WinSMBiosData
sourcepub const USED20_CALLING_METHOD_OFFSET: usize
pub const USED20_CALLING_METHOD_OFFSET: usize
Offset of the Used20CallingMethod field (0)
sourcepub const SMBIOS_MAJOR_VERSION_OFFSET: usize
pub const SMBIOS_MAJOR_VERSION_OFFSET: usize
Offset of the SMBIOSMajorVersion field (1)
sourcepub const SMBIOS_MINOR_VERSION_OFFSET: usize
pub const SMBIOS_MINOR_VERSION_OFFSET: usize
Offset of the SMBIOSMinorVersion field (2)
sourcepub const DMI_REVISION_OFFSET: usize
pub const DMI_REVISION_OFFSET: usize
Offset of the DMIRevision field (3)
sourcepub const TABLE_DATA_LENGTH_OFFSET: usize
pub const TABLE_DATA_LENGTH_OFFSET: usize
Offset of the Length field (4)
sourcepub const SMBIOS_TABLE_DATA_OFFSET: usize
pub const SMBIOS_TABLE_DATA_OFFSET: usize
Offset of the SMBIOSTableData field (8)
sourcepub fn new(raw_smbios_data: Vec<u8>) -> Result<WinSMBiosData, Error>
pub fn new(raw_smbios_data: Vec<u8>) -> Result<WinSMBiosData, Error>
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.
sourcepub fn is_valid_win_smbios_data(raw_data: &Vec<u8>) -> bool
pub fn is_valid_win_smbios_data(raw_data: &Vec<u8>) -> bool
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.
sourcepub fn raw_smbios_data(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn raw_smbios_data(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
The raw SMBIOS data this structure is wrapping
sourcepub fn used20_calling_method(&self) -> u8
pub fn used20_calling_method(&self) -> u8
Used20CallingMethod
sourcepub fn smbios_major_version(&self) -> u8
pub fn smbios_major_version(&self) -> u8
SMBIOS major version
sourcepub fn smbios_minor_version(&self) -> u8
pub fn smbios_minor_version(&self) -> u8
SMBIOS minor version
sourcepub fn dmi_revision(&self) -> u8
pub fn dmi_revision(&self) -> u8
DMI revision
sourcepub fn table_data_length(&self) -> u32
pub fn table_data_length(&self) -> u32
Length of the smbios table data
Trait Implementations
sourceimpl Debug for WinSMBiosData
impl Debug for WinSMBiosData
sourceimpl Serialize for WinSMBiosData
impl Serialize for WinSMBiosData
Auto Trait Implementations
impl RefUnwindSafe for WinSMBiosData
impl Send for WinSMBiosData
impl Sync for WinSMBiosData
impl Unpin for WinSMBiosData
impl UnwindSafe for WinSMBiosData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more