# Hardware inventory
```rust,no_run
# fn main() -> Result<(), Box<dyn std::error::Error>> {
use sinf::hardware::Hardware;
let hardware = Hardware::new()?;
if let Some(bios) = &hardware.bios {
println!("BIOS: {:?} {:?}", bios.vendor, bios.version);
}
for module in &hardware.memory_devices {
println!("RAM: {:?} {:?}", module.locator, module.size_bytes);
}
for device in &hardware.pci_devices {
println!("PCI {} {:04x}:{:04x}", device.address, device.vendor_id, device.device_id);
}
for device in &hardware.usb_devices {
println!("USB {:04x}:{:04x}", device.vendor_id, device.product_id);
}
for sensor in &hardware.sensors {
println!("{:?} {} = {}", sensor.kind, sensor.label, sensor.value);
}
# Ok(())
# }
```
`Hardware::new()` loads a snapshot. `hardware.refresh()` reloads it. Some
fields are empty when the platform, permissions or drivers do not expose them.