raw_cpuid

Trait CpuIdReader

source
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§

source

fn cpuid2(&self, eax: u32, ecx: u32) -> CpuIdResult

Provided Methods§

source

fn cpuid1(&self, eax: u32) -> CpuIdResult

Object Safety§

This trait is not object safe.

Implementors§