pub struct CustomHardwareInfo {Show 14 fields
pub cpu: Option<CPUInfo>,
pub gpus: Vec<GPUInfo>,
pub memory: Option<MemoryInfo>,
pub storage_devices: Vec<StorageInfo>,
pub network_interfaces: Vec<NetworkInfo>,
pub battery: Option<BatteryInfo>,
pub thermal: Option<ThermalInfo>,
pub pci_devices: Vec<PCIDevice>,
pub usb_devices: Vec<USBDevice>,
pub virtualization: Option<VirtualizationInfo>,
pub power_profile: Option<PowerProfile>,
pub timestamp: SystemTime,
pub query_time_ms: u64,
pub requested_components: Vec<String>,
}
Expand description
Customizable hardware information result
Fields§
§cpu: Option<CPUInfo>
§gpus: Vec<GPUInfo>
§memory: Option<MemoryInfo>
§storage_devices: Vec<StorageInfo>
§network_interfaces: Vec<NetworkInfo>
§battery: Option<BatteryInfo>
§thermal: Option<ThermalInfo>
§pci_devices: Vec<PCIDevice>
§usb_devices: Vec<USBDevice>
§virtualization: Option<VirtualizationInfo>
§power_profile: Option<PowerProfile>
§timestamp: SystemTime
Timestamp when this information was collected
query_time_ms: u64
Query execution time in milliseconds
requested_components: Vec<String>
Which components were requested
Implementations§
Source§impl CustomHardwareInfo
impl CustomHardwareInfo
Sourcepub fn has_component(&self, component: &str) -> bool
pub fn has_component(&self, component: &str) -> bool
Check if a specific component was included in the query
Sourcepub fn component_count(&self) -> usize
pub fn component_count(&self) -> usize
Get the total number of components that were queried
Sourcepub fn to_full_hardware_info(&self) -> HardwareInfo
pub fn to_full_hardware_info(&self) -> HardwareInfo
Convert to a full HardwareInfo struct (filling missing components with defaults)
Sourcepub fn query_summary(&self) -> String
pub fn query_summary(&self) -> String
Get a summary of what was queried
Trait Implementations§
Source§impl Debug for CustomHardwareInfo
impl Debug for CustomHardwareInfo
Source§impl<'de> Deserialize<'de> for CustomHardwareInfo
impl<'de> Deserialize<'de> for CustomHardwareInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CustomHardwareInfo
impl RefUnwindSafe for CustomHardwareInfo
impl Send for CustomHardwareInfo
impl Sync for CustomHardwareInfo
impl Unpin for CustomHardwareInfo
impl UnwindSafe for CustomHardwareInfo
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