Gets the Interfaces from a computer
use ifcfg::{IfCfg, Result};
fn main() -> Result<()> {
let adapters = IfCfg::get().expect("could not get interfaces");
println!("{}", serde_json::to_string(&adapters)?);
Ok(())
}
Formats the value using the given formatter. Read more
Serialize this value into the given Serde serializer. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.