pub enum EntryPoint {
V2(EntryPointV2),
V3(EntryPointV3),
}Variants§
V2(EntryPointV2)
V3(EntryPointV3)
Implementations§
Source§impl EntryPoint
impl EntryPoint
pub fn len(&self) -> u8
pub fn major(&self) -> u8
pub fn minor(&self) -> u8
pub fn revision(&self) -> u8
pub fn smbios_address(&self) -> u64
pub fn smbios_len(&self) -> u32
pub fn to_version(&self) -> SmbiosVersion
Sourcepub fn structures<'buffer>(&self, buffer: &'buffer [u8]) -> Structures<'buffer> ⓘ
pub fn structures<'buffer>(&self, buffer: &'buffer [u8]) -> Structures<'buffer> ⓘ
Create an iterator across the SMBIOS structures found in buffer.
§Example
use dmidecode::EntryPoint;
const DMIDECODE_BIN: &'static [u8] = include_bytes!("../tests/data/dmidecode.bin");
let entry_point = EntryPoint::search(DMIDECODE_BIN).unwrap();
for s in entry_point.structures(&DMIDECODE_BIN[entry_point.smbios_address() as usize..]) {
let table = s.unwrap();
// process raw...
}Sourcepub fn search(buffer: &[u8]) -> Result<EntryPoint, InvalidEntryPointError>
pub fn search(buffer: &[u8]) -> Result<EntryPoint, InvalidEntryPointError>
Search for an instance of an SMBIOS EntryPoint in a memory buffer.
§Example
use dmidecode::EntryPoint;
const ENTRY_BIN: &'static [u8] = include_bytes!("../tests/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.
Trait Implementations§
Source§impl Clone for EntryPoint
impl Clone for EntryPoint
Source§fn clone(&self) -> EntryPoint
fn clone(&self) -> EntryPoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntryPoint
impl Debug for EntryPoint
Source§impl Hash for EntryPoint
impl Hash for EntryPoint
Source§impl PartialEq for EntryPoint
impl PartialEq for EntryPoint
impl Copy for EntryPoint
impl Eq for EntryPoint
impl StructuralPartialEq for EntryPoint
Auto Trait Implementations§
impl Freeze for EntryPoint
impl RefUnwindSafe for EntryPoint
impl Send for EntryPoint
impl Sync for EntryPoint
impl Unpin for EntryPoint
impl UnwindSafe for EntryPoint
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
Mutably borrows from an owned value. Read more