pub struct SystemOverview {
pub cpu: SimpleCPU,
pub memory_gb: f64,
pub gpu: Option<SimpleGPU>,
pub storage: SimpleStorage,
pub health: SystemHealth,
pub environment: String,
pub performance_score: u8,
}
Expand description
Simplified system overview with the most commonly needed information
Fields§
§cpu: SimpleCPU
CPU name and core count
memory_gb: f64
Total system memory in GB
gpu: Option<SimpleGPU>
GPU information (if available)
storage: SimpleStorage
Storage summary
health: SystemHealth
System health status
environment: String
Environment type (native, container, VM, etc.)
performance_score: u8
Overall performance score (0-100)
Implementations§
Source§impl SystemOverview
Simplified hardware query functions
impl SystemOverview
Simplified hardware query functions
Sourcepub fn quick() -> Result<Self>
pub fn quick() -> Result<Self>
Get a quick system overview with the most important information
This is the fastest way to get a comprehensive system summary. Perfect for:
- System diagnostics and health checks
- Application compatibility verification
- Performance baseline establishment
- Environment detection (native/container/VM)
§Example
use hardware_query::SystemOverview;
let overview = SystemOverview::quick()?;
// Get formatted system summary
println!("{}", overview);
// Access specific components
println!("CPU: {} cores", overview.cpu.cores);
println!("Memory: {:.1} GB", overview.memory_gb);
if let Some(gpu) = &overview.gpu {
println!("GPU: {} ({:.1} GB VRAM)", gpu.name, gpu.vram_gb);
}
// Check system health
println!("System Health: {:?}", overview.health.overall_status);
println!("Performance Score: {}/100", overview.performance_score);
Sourcepub fn from_hardware_info(hw_info: HardwareInfo) -> Result<Self>
pub fn from_hardware_info(hw_info: HardwareInfo) -> Result<Self>
Create a system overview from detailed hardware information
Sourcepub fn is_ai_ready(&self) -> bool
pub fn is_ai_ready(&self) -> bool
Check if the system is suitable for AI/ML workloads
Sourcepub fn get_recommendations(&self) -> Vec<String>
pub fn get_recommendations(&self) -> Vec<String>
Get simple recommendations for improving system performance
Trait Implementations§
Source§impl Clone for SystemOverview
impl Clone for SystemOverview
Source§fn clone(&self) -> SystemOverview
fn clone(&self) -> SystemOverview
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 moreSource§impl Debug for SystemOverview
impl Debug for SystemOverview
Source§impl<'de> Deserialize<'de> for SystemOverview
impl<'de> Deserialize<'de> for SystemOverview
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 SystemOverview
impl RefUnwindSafe for SystemOverview
impl Send for SystemOverview
impl Sync for SystemOverview
impl Unpin for SystemOverview
impl UnwindSafe for SystemOverview
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