pub struct Processor { /* private fields */ }
Expand description
Each instance of this struct represent a block in /proc/cpuinfo. See (CpuInfo)[struct.CpuInfo.html].
Fields of this struct reference to proc.c.
Note: this is for x86_64, other architecture may not work.
Implementations§
Source§impl Processor
impl Processor
pub fn processor(&self) -> &u8
pub fn vendor_id(&self) -> &String
pub fn cpu_family(&self) -> &u8
pub fn model(&self) -> &u8
pub fn model_name(&self) -> &String
Sourcepub fn stepping(&self) -> &Option<u8>
pub fn stepping(&self) -> &Option<u8>
Return None if stepping
is not number or the fields doesn’t appear.
In first case, it should be “unknonw”, but it doesn’t actually be checked.
pub fn microcode(&self) -> &Option<u32>
pub fn cpu_mhz(&self) -> &Option<f64>
Sourcepub fn cache_size(&self) -> &Option<u32>
pub fn cache_size(&self) -> &Option<u32>
Unit is KB(KiB).
pub fn physical_id(&self) -> &Option<u16>
pub fn siblings(&self) -> &Option<u32>
pub fn core_id(&self) -> &Option<u16>
pub fn cpu_cores(&self) -> &Option<u16>
pub fn apicid(&self) -> &Option<u16>
pub fn initial_apicid(&self) -> &Option<u16>
pub fn fdiv_bug(&self) -> &Option<bool>
pub fn f00f_bug(&self) -> &Option<bool>
pub fn coma_bug(&self) -> &Option<bool>
Sourcepub fn fpu_exception(&self) -> &Option<bool>
pub fn fpu_exception(&self) -> &Option<bool>
always true if appears.
pub fn cpuid_level(&self) -> &Option<i32>
pub fn flags(&self) -> &Vec<String>
pub fn bugs(&self) -> &Vec<String>
pub fn bogomips(&self) -> &f64
pub fn tlb_size(&self) -> &Option<i32>
pub fn clflush_size(&self) -> &u16
pub fn cache_alignment(&self) -> &i32
Sourcepub fn address_sizes(&self) -> &(u8, u8)
pub fn address_sizes(&self) -> &(u8, u8)
(bits physical, bits virtual)
pub fn power_management(&self) -> &Vec<String>
Trait Implementations§
impl StructuralPartialEq for Processor
Auto Trait Implementations§
impl Freeze for Processor
impl RefUnwindSafe for Processor
impl Send for Processor
impl Sync for Processor
impl Unpin for Processor
impl UnwindSafe for Processor
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