mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-18 16:21:28 +00:00
312 B
312 B
With the serde
feature enabled, you can then serialize sysinfo
types. Let's see an example with serde_json
:
use sysinfo::System;
let mut sys = System::new_all();
// First we update all information of our `System` struct.
sys.refresh_all();
println!("{}", serde_json::to_string(&sys).unwrap());