Struct HardwareInfo

Source
pub struct HardwareInfo {
Show 16 fields pub timestamp: u64, pub cpu: CPUInfo, pub gpus: Vec<GPUInfo>, pub npus: Vec<NPUInfo>, pub tpus: Vec<TPUInfo>, pub arm_hardware: Option<ARMHardwareInfo>, pub fpgas: Vec<FPGAInfo>, pub memory: MemoryInfo, pub storage_devices: Vec<StorageInfo>, pub network_interfaces: Vec<NetworkInfo>, pub battery: Option<BatteryInfo>, pub thermal: ThermalInfo, pub pci_devices: Vec<PCIDevice>, pub usb_devices: Vec<USBDevice>, pub power_profile: Option<PowerProfile>, pub virtualization: VirtualizationInfo,
}
Expand description

Complete system hardware information

Fields§

§timestamp: u64

Timestamp when the hardware information was collected

§cpu: CPUInfo

CPU information

§gpus: Vec<GPUInfo>

GPU information (multiple GPUs supported)

§npus: Vec<NPUInfo>

NPU information (Neural Processing Units)

§tpus: Vec<TPUInfo>

TPU information (Tensor Processing Units)

§arm_hardware: Option<ARMHardwareInfo>

ARM-specific hardware information (if running on ARM)

§fpgas: Vec<FPGAInfo>

FPGA accelerators

§memory: MemoryInfo

Memory information

§storage_devices: Vec<StorageInfo>

Storage devices

§network_interfaces: Vec<NetworkInfo>

Network interfaces

§battery: Option<BatteryInfo>

Battery information (if available)

§thermal: ThermalInfo

Thermal sensors and fans

§pci_devices: Vec<PCIDevice>

PCI devices

§usb_devices: Vec<USBDevice>

USB devices

§power_profile: Option<PowerProfile>

Power consumption and efficiency profile

§virtualization: VirtualizationInfo

Virtualization environment information

Implementations§

Source§

impl HardwareInfo

Source

pub fn query() -> Result<Self>

Query all available hardware information

Source

pub fn cpu(&self) -> &CPUInfo

Get CPU information

Source

pub fn gpus(&self) -> &[GPUInfo]

Get GPU information

Source

pub fn npus(&self) -> &[NPUInfo]

Get NPU information

Source

pub fn tpus(&self) -> &[TPUInfo]

Get TPU information

Source

pub fn arm_hardware(&self) -> Option<&ARMHardwareInfo>

Get ARM hardware information (if available)

Source

pub fn fpgas(&self) -> &[FPGAInfo]

Get FPGA accelerator information

Source

pub fn memory(&self) -> &MemoryInfo

Get memory information

Source

pub fn storage_devices(&self) -> &[StorageInfo]

Get storage devices

Source

pub fn network_interfaces(&self) -> &[NetworkInfo]

Get network interfaces

Source

pub fn battery(&self) -> Option<&BatteryInfo>

Get battery information (if available)

Source

pub fn thermal(&self) -> &ThermalInfo

Get thermal information

Source

pub fn pci_devices(&self) -> &[PCIDevice]

Get PCI devices

Source

pub fn usb_devices(&self) -> &[USBDevice]

Get USB devices

Source

pub fn power_profile(&self) -> Option<&PowerProfile>

Get power profile information (if available)

Source

pub fn virtualization(&self) -> &VirtualizationInfo

Get virtualization information

Source

pub fn is_arm_system(&self) -> bool

Check if system is ARM-based

Source

pub fn has_fpgas(&self) -> bool

Check if system has FPGA accelerators

Source

pub fn is_virtualized(&self) -> bool

Check if running in a virtualized environment

Source

pub fn is_containerized(&self) -> bool

Check if running in a container

Source

pub fn virtualization_performance_impact(&self) -> f64

Get estimated performance impact from virtualization (0.0 to 1.0)

Source

pub fn accelerator_count(&self) -> usize

Get count of specialized accelerators (NPUs + TPUs + FPGAs)

Source

pub fn accelerator_summary(&self) -> HashMap<String, usize>

Get comprehensive accelerator information

Source

pub fn to_json(&self) -> Result<String>

Export hardware information as JSON

Source

pub fn from_json(json: &str) -> Result<Self>

Import hardware information from JSON

Source

pub fn summary(&self) -> HardwareSummary

Get a summary of the most important hardware information

Trait Implementations§

Source§

impl Clone for HardwareInfo

Source§

fn clone(&self) -> HardwareInfo

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 HardwareInfo

Source§

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

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

impl<'de> Deserialize<'de> for HardwareInfo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HardwareInfo

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

Auto Trait Implementations§

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, 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> 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,