pub trait CpuIdReader: Clone {
// Required method
fn cpuid2(&self, eax: u32, ecx: u32) -> CpuIdResult;
// Provided method
fn cpuid1(&self, eax: u32) -> CpuIdResult { ... }
}
Expand description
Implements function to read/write cpuid. This allows to conveniently swap out the underlying cpuid implementation with one that returns data that is deterministic (for unit-testing).
Required Methods§
fn cpuid2(&self, eax: u32, ecx: u32) -> CpuIdResult
Provided Methods§
fn cpuid1(&self, eax: u32) -> CpuIdResult
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.