simple_struct/
simple_struct.rs

1use derive_wizard::Wizard;
2
3#[derive(Debug, Wizard)]
4struct ServerConfig {
5    #[prompt("Server host:")]
6    host: String,
7
8    #[prompt("Server port:")]
9    #[min(1024)]
10    #[max(65535)]
11    port: i32,
12
13    #[prompt("Enable SSL:")]
14    ssl: bool,
15}
16
17fn main() {
18    let config = ServerConfig::wizard_builder().build().unwrap();
19    println!("Configuration: {:#?}", config);
20}