inquiry

Crates.ioinquiry
lib.rsinquiry
version0.1.4
created_at2025-06-19 23:52:13.311198+00
updated_at2025-07-02 01:15:58.256631+00
descriptionA utility macro for the inquire crate
homepagehttps://github.com/thebearodactyl/inquiry
repositoryhttps://github.com/thebearodactyl/inquiry
max_upload_size
id1718993
size18,103
The Bearodactyl (TheBearodactyl)

documentation

README

Inquiry - Create menus out of enumerations with the power of inquire

#[derive(Debug, Copy, Clone, Choice)]
enum ExampleChoice {
  /// Description of choice 1
  ChoiceOne,

  /// Description of choice 2
  ChoiceTwo,
}

fn main() -> InqureResult<()> {
  let first_choice = ExampleChoice::choice("Please choose one")?;

  match first_choice {
    ExampleChoice::ChoiceOne => println!("Chose `ChoiceOne`"),
    ExampleChoice::ChoiceTwo => println!("Chose `ChoiceTwo`"),
  }

  Ok(())
}
Commit count: 7

cargo fmt