Struct procfs::CpuInfo[][src]

pub struct CpuInfo {
    pub fields: HashMap<String, String>,
    pub cpus: Vec<HashMap<String, String>>,
}

Represents the data from /proc/cpuinfo.

The fields field stores the fields that are common among all CPUs. The cpus field stores CPU-specific info.

For common fields, there are methods that will return the data, converted to a more appropriate data type. These methods will all return None if the field doesn't exist, or is in some unexpected format (in that case, you'll have to access the string data directly).

Fields

This stores fields that are common among all CPUs

Methods

impl CpuInfo
[src]

Get the total number of cpu cores.

This is the number of entries in the /proc/cpuinfo file.

Get info for a specific cpu.

This will merge the common fields with the cpu-specific fields.

Returns None if the requested cpu index is not found.

Trait Implementations

impl Debug for CpuInfo
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for CpuInfo

impl Sync for CpuInfo