use inspect_rs::{Inspect, InspectCx, format_tree};
#[derive(Inspect)]
struct Address {
street: String,
city: String,
zip: String,
}
#[derive(Inspect)]
struct User {
id: u64,
name: String,
address: Address,
}
fn main() {
let user = User {
id: 1,
name: "Bob".to_string(),
address: Address {
street: "123 Main St".to_string(),
city: "Springfield".to_string(),
zip: "12345".to_string(),
},
};
let mut cx = InspectCx::new();
let inspected = user.inspect(&mut cx);
println!("{}", format_tree(&inspected));
}