pub struct Cpu<'cpu_info>(/* private fields */);
Expand description
Information about a single CPU.
Implementations§
Source§impl<'cpu_info> Cpu<'cpu_info>
impl<'cpu_info> Cpu<'cpu_info>
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
Return the raw value stored under the given key if available.
Sourcepub fn cpu_family(&self) -> Option<u8>
pub fn cpu_family(&self) -> Option<u8>
Return the CPU family if available.
Sourcepub fn model_name(&self) -> Option<&str>
pub fn model_name(&self) -> Option<&str>
Return the model name if available.
Sourcepub fn cache_size(&self) -> Option<usize>
pub fn cache_size(&self) -> Option<usize>
Return the cache size in bytes if available.
Sourcepub fn physical_id(&self) -> Option<usize>
pub fn physical_id(&self) -> Option<usize>
Return the physical ID if available.
Sourcepub fn initial_apicid(&self) -> Option<usize>
pub fn initial_apicid(&self) -> Option<usize>
Return the initial APIC ID if available.
Sourcepub fn fpu_exception(&self) -> Option<bool>
pub fn fpu_exception(&self) -> Option<bool>
Return the FPU exception flag if available.
Sourcepub fn cpuid_level(&self) -> Option<usize>
pub fn cpuid_level(&self) -> Option<usize>
Return the CPU ID level if available.
Sourcepub fn clflush_size(&self) -> Option<usize>
pub fn clflush_size(&self) -> Option<usize>
Return the CL flush size if available.
Sourcepub fn cache_alignment(&self) -> Option<usize>
pub fn cache_alignment(&self) -> Option<usize>
Return the cache alignment if available.
Sourcepub fn address_sizes(&self) -> Option<(usize, usize)>
pub fn address_sizes(&self) -> Option<(usize, usize)>
Return the address sizes if available.
§Returns
Returns a tuple of (<pysical>, <virtual>)
sizes if available, else None
.
Sourcepub fn power_management(&self) -> Option<&str>
pub fn power_management(&self) -> Option<&str>
Returns the power management if available.
Trait Implementations§
impl<'cpu_info> Eq for Cpu<'cpu_info>
impl<'cpu_info> StructuralPartialEq for Cpu<'cpu_info>
Auto Trait Implementations§
impl<'cpu_info> Freeze for Cpu<'cpu_info>
impl<'cpu_info> RefUnwindSafe for Cpu<'cpu_info>
impl<'cpu_info> Send for Cpu<'cpu_info>
impl<'cpu_info> Sync for Cpu<'cpu_info>
impl<'cpu_info> Unpin for Cpu<'cpu_info>
impl<'cpu_info> UnwindSafe for Cpu<'cpu_info>
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