Struct proc_cpuinfo::Cpu

source ·
pub struct Cpu<'cpu_info>(_);

Implementations§

source§

impl<'cpu_info> Cpu<'cpu_info>

source

pub fn get(&self, key: &str) -> Option<&str>

source

pub fn processor(&self) -> Option<usize>

source

pub fn vendor_id(&self) -> Option<&str>

source

pub fn cpu_family(&self) -> Option<u8>

source

pub fn model(&self) -> Option<usize>

source

pub fn model_name(&self) -> Option<&str>

source

pub fn stepping(&self) -> Option<usize>

source

pub fn microcode(&self) -> Option<usize>

source

pub fn cpu_mhz(&self) -> Option<f32>

source

pub fn cache_size(&self) -> Option<usize>

Returns the CPU’s cache size in bytes

source

pub fn physical_id(&self) -> Option<usize>

source

pub fn siblings(&self) -> Option<usize>

source

pub fn core_id(&self) -> Option<usize>

source

pub fn cpu_cores(&self) -> Option<usize>

source

pub fn apicid(&self) -> Option<usize>

source

pub fn initial_apicid(&self) -> Option<usize>

source

pub fn fpu(&self) -> Option<bool>

source

pub fn fpu_exception(&self) -> Option<bool>

source

pub fn cpuid_level(&self) -> Option<usize>

source

pub fn wp(&self) -> Option<bool>

source

pub fn flags(&self) -> HashSet<&str>

source

pub fn vmx_flags(&self) -> HashSet<&str>

source

pub fn bugs(&self) -> HashSet<&str>

source

pub fn bogomips(&self) -> Option<f32>

source

pub fn clflush_size(&self) -> Option<usize>

source

pub fn cache_alignment(&self) -> Option<usize>

source

pub fn address_sizes(&self) -> Option<(usize, usize)>

source

pub fn power_management(&self) -> Option<&str>

Trait Implementations§

source§

impl<'cpu_info> Debug for Cpu<'cpu_info>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'cpu_info> PartialEq<Cpu<'cpu_info>> for Cpu<'cpu_info>

source§

fn eq(&self, other: &Cpu<'cpu_info>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'cpu_info> Eq for Cpu<'cpu_info>

source§

impl<'cpu_info> StructuralEq for Cpu<'cpu_info>

source§

impl<'cpu_info> StructuralPartialEq for Cpu<'cpu_info>

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.