suggestions/
suggestions.rs

1use derive_wizard::Wizard;
2
3#[derive(Debug, Wizard)]
4#[allow(unused)]
5struct UserProfile {
6    #[prompt("Enter your name:")]
7    name: String,
8
9    #[prompt("Enter your age:")]
10    age: u16,
11
12    #[prompt("Are you a developer?")]
13    is_developer: bool,
14}
15
16fn main() {
17    println!("=== Creating a new user profile ===");
18    let profile = UserProfile::wizard_builder().build().unwrap();
19    println!("Created profile: {profile:#?}");
20
21    println!("=== Editing the existing profile ===");
22    println!("The current values will be pre-filled as suggestions.");
23    let updated_profile = UserProfile::wizard_builder()
24        .with_suggestions(profile)
25        .build()
26        .unwrap();
27    println!("Updated profile: {updated_profile:#?}");
28}