Experimenting with more structured ways to handle command-line input/output in Rust
use output_macros::Output;

#[derive(Output)]
struct SimpleOutput {
    first: usize,
    second: String,
}

fn main() {
    // Create builder (auto-generated by #[derive(Output)])
    let mut builder = SimpleOutput::new();

    dbg!(builder.get_first()); // Empty (None)
    builder.first(2); // Set to Some(2)
    dbg!(builder.get_first()); // Full (Some(2))

    dbg!(builder.get_second()); // Empty (None)
    builder.second(String::from("It works!!")); // Set to Some("It works!!")
    dbg!(builder.get_second()); // Full (Some("It works!!"))
}