CPU

Struct CPU 

Source
pub struct CPU {
Show 38 fields pub processor: Option<usize>, pub vendor_id: Option<String>, pub cpu_family: Option<u32>, pub model: Option<u32>, pub model_name: Option<String>, pub stepping: Option<u32>, pub microcode: Option<String>, pub cpu_mhz: Option<f32>, pub cache_size: Option<Size>, pub physical_id: Option<u32>, pub siblings: Option<u32>, pub core_id: Option<u32>, pub cpu_cores: Option<u32>, pub apicid: Option<u32>, pub initial_apicid: Option<u32>, pub fpu: Option<bool>, pub fpu_exception: Option<bool>, pub cpuid_level: Option<u32>, pub wp: Option<bool>, pub flags: Option<Vec<String>>, pub bugs: Option<Vec<String>>, pub bogomips: Option<f64>, pub clflush_size: Option<u32>, pub cache_alignment: Option<u32>, pub address_sizes: Option<String>, pub power_management: Option<String>, pub cpu_implementer: Option<String>, pub cpu_architecture: Option<u8>, pub cpu_variant: Option<String>, pub cpu_part: Option<String>, pub cpu_revision: Option<u32>, pub cpu: Option<String>, pub clock: Option<f32>, pub revision: Option<String>, pub timebase: Option<usize>, pub platform: Option<String>, pub machine: Option<String>, pub model_ppc: Option<String>,
}
Expand description

A structure with data about each processor core/thread

Fields§

§processor: Option<usize>

Entry number (index)

§vendor_id: Option<String>

Vendor name

§cpu_family: Option<u32>

CPU Family ID

§model: Option<u32>

Model ID

§model_name: Option<String>

Model name

§stepping: Option<u32>

Stepping

§microcode: Option<String>

Microcode number (representation as a String!)

§cpu_mhz: Option<f32>

CPU core/thread current frequency

§cache_size: Option<Size>

L3 cache size

§physical_id: Option<u32>

Physical ID of CPU core/thread

§siblings: Option<u32>

Siblings

§core_id: Option<u32>

Core ID

§cpu_cores: Option<u32>

CPU cores count

§apicid: Option<u32>

APIC ID

§initial_apicid: Option<u32>

Initial APIC ID

§fpu: Option<bool>

Is FPU exists?

§fpu_exception: Option<bool>§cpuid_level: Option<u32>§wp: Option<bool>§flags: Option<Vec<String>>§bugs: Option<Vec<String>>§bogomips: Option<f64>§clflush_size: Option<u32>§cache_alignment: Option<u32>§address_sizes: Option<String>§power_management: Option<String>§cpu_implementer: Option<String>§cpu_architecture: Option<u8>§cpu_variant: Option<String>§cpu_part: Option<String>§cpu_revision: Option<u32>§cpu: Option<String>§clock: Option<f32>§revision: Option<String>§timebase: Option<usize>§platform: Option<String>§machine: Option<String>§model_ppc: Option<String>

Trait Implementations§

Source§

impl Clone for CPU

Source§

fn clone(&self) -> CPU

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CPU

Source§

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

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

impl Default for CPU

Source§

fn default() -> CPU

Returns the “default value” for a type. Read more
Source§

impl Serialize for CPU

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToJson for CPU

Source§

fn to_json(&self) -> Result<String>
where Self: Serialize,

Convert object data to machine-readable JSON format (without unnecessary indentation and newline transitions)
Source§

fn to_json_pretty(&self) -> Result<String>
where Self: Serialize,

Convert object data to human-readable JSON format (“pretty”; with additional newline transitions and indentation)
Source§

impl ToPlainText for CPU

Available on x86-64 only.
Source§

fn to_plain(&self) -> String

Convert structure fields to String

Auto Trait Implementations§

§

impl Freeze for CPU

§

impl RefUnwindSafe for CPU

§

impl Send for CPU

§

impl Sync for CPU

§

impl Unpin for CPU

§

impl UnwindSafe for CPU

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more