smbioslib/structs/
structure.rs

1use crate::core::UndefinedStruct;
2
3/// # SMBIOS Structure
4///
5/// A type implementing this trait provides a representation of an SMBIOS type.
6pub trait SMBiosStruct<'a> {
7    /// The SMBIOS structure type
8    ///
9    /// Example: System Information (Type 1) this is set to 1.
10    const STRUCT_TYPE: u8;
11
12    /// Creates a new instance of the implementing SMBIOS type
13    fn new(parts: &'a UndefinedStruct) -> Self;
14
15    /// Contains the standard parts/sections of the implementing SMBIOS type.
16    fn parts(&self) -> &'a UndefinedStruct;
17}