spytial 0.2.0

Drop-in replacement for std::dbg! that opens an interactive diagram of Rust values (Spytial for Rust).
Documentation
use serde::Serialize;
use spytial::export_json_instance;

#[derive(Serialize)]
#[allow(dead_code)]
enum Color {
    Red,
    Black,
    Blue,
}

#[derive(Serialize)]
struct TestStruct {
    color: Color,
    value: u32,
}

fn main() {
    let test = TestStruct {
        color: Color::Red,
        value: 42,
    };

    let instance = export_json_instance(&test);

    println!("Atoms:");
    for atom in &instance.atoms {
        println!(
            "  - id: {}, type: {}, label: {}",
            atom.id, atom.r#type, atom.label
        );
    }

    println!("\nRelations:");
    for relation in &instance.relations {
        println!("  - {}: {} tuples", relation.name, relation.tuples.len());
        for tuple in &relation.tuples {
            println!("    types: {:?}", tuple.types);
        }
    }
}