pub struct MacOSCPUInfo {Show 15 fields
pub brand_string: String,
pub vendor: String,
pub cpu_type: String,
pub cpu_subtype: String,
pub physical_cpu: u32,
pub logical_cpu: u32,
pub cpu_freq: u64,
pub cpu_freq_max: u64,
pub cpu_freq_min: u64,
pub l1_icache_size: u64,
pub l1_dcache_size: u64,
pub l2_cache_size: u64,
pub l3_cache_size: u64,
pub cache_line_size: u64,
pub features: Vec<String>,
}Expand description
macOS-specific CPU information
Fields§
§brand_string: String§vendor: String§cpu_type: String§cpu_subtype: String§physical_cpu: u32§logical_cpu: u32§cpu_freq: u64§cpu_freq_max: u64§cpu_freq_min: u64§l1_icache_size: u64§l1_dcache_size: u64§l2_cache_size: u64§l3_cache_size: u64§cache_line_size: u64§features: Vec<String>Implementations§
Source§impl MacOSCPUInfo
impl MacOSCPUInfo
Sourcepub fn get_temperature() -> Result<Option<f32>>
pub fn get_temperature() -> Result<Option<f32>>
Get CPU temperature using powermetrics (requires sudo)
Trait Implementations§
Source§impl Clone for MacOSCPUInfo
impl Clone for MacOSCPUInfo
Source§fn clone(&self) -> MacOSCPUInfo
fn clone(&self) -> MacOSCPUInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MacOSCPUInfo
impl RefUnwindSafe for MacOSCPUInfo
impl Send for MacOSCPUInfo
impl Sync for MacOSCPUInfo
impl Unpin for MacOSCPUInfo
impl UnwindSafe for MacOSCPUInfo
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