let data = r#"Scene(
materials: {
"metal": (reflectivity: 1.0),
"plastic": (reflectivity: 0.5),
},
entities: [
(name: "hero", material: "metal"),
(name: "monster", material: "plastic"),
],
)"#;
let scene = ron::from_str(data).unwrap();
let table = ron_to_table::to_string(&scene);
println!("{}", table);
|
+-------------+--------------------------------------------+
| entities | +----------------------------+ |
| | | +------------+---------+ | |
| | | | material | metal | | |
| | | +------------+---------+ | |
| | | | name | hero | | |
| | | +------------+---------+ | |
| | +----------------------------+ |
| | | +------------+-----------+ | |
| | | | material | plastic | | |
| | | +------------+-----------+ | |
| | | | name | monster | | |
| | | +------------+-----------+ | |
| | +----------------------------+ |
+-------------+--------------------------------------------+
| materials | +-----------+----------------------------+ |
| | | metal | +----------------+-----+ | |
| | | | | reflectivity | 1 | | |
| | | | +----------------+-----+ | |
| | +-----------+----------------------------+ |
| | | plastic | +----------------+-------+ | |
| | | | | reflectivity | 0.5 | | |
| | | | +----------------+-------+ | |
| | +-----------+----------------------------+ |
+-------------+--------------------------------------------+
|