pub trait CpuidTrait {
// Required methods
fn get(&self, key: &CpuidKey) -> Option<&CpuidEntry>;
fn get_mut(&mut self, key: &CpuidKey) -> Option<&mut CpuidEntry>;
// Provided methods
fn vendor_id(&self) -> Option<[u8; 12]> { ... }
fn apply_brand_string(
&mut self,
brand_string: &[u8; 48],
) -> Result<(), MissingBrandStringLeaves> { ... }
}Expand description
Trait defining shared behaviour between CPUID structures.
Required Methods§
Sourcefn get(&self, key: &CpuidKey) -> Option<&CpuidEntry>
fn get(&self, key: &CpuidKey) -> Option<&CpuidEntry>
Gets a given sub-leaf.
Sourcefn get_mut(&mut self, key: &CpuidKey) -> Option<&mut CpuidEntry>
fn get_mut(&mut self, key: &CpuidKey) -> Option<&mut CpuidEntry>
Gets a given sub-leaf.
Provided Methods§
Sourcefn vendor_id(&self) -> Option<[u8; 12]>
fn vendor_id(&self) -> Option<[u8; 12]>
Returns the CPUID manufacturers ID (e.g. GenuineIntel or AuthenticAMD) or None if it
cannot be found in CPUID (e.g. leaf 0x0 is missing).
Sourcefn apply_brand_string(
&mut self,
brand_string: &[u8; 48],
) -> Result<(), MissingBrandStringLeaves>
fn apply_brand_string( &mut self, brand_string: &[u8; 48], ) -> Result<(), MissingBrandStringLeaves>
Applies a given brand string to CPUID.
§Errors
When any of the leaves 0x80000002, 0x80000003 or 0x80000004 are not present.