(&self, prompt: &str, label: &str)
| 31 | } |
| 32 | |
| 33 | pub fn required_input(&self, prompt: &str, label: &str) -> Result<String> { |
| 34 | let input = Text::new(prompt) |
| 35 | .with_render_config(self.config) |
| 36 | .with_validator(required!(format!("{label} can't be empty").as_str())) |
| 37 | .prompt()?; |
| 38 | Ok(input) |
| 39 | } |
| 40 | |
| 41 | pub fn select(&self, prompt: &str, choices: Vec<Type>) -> Result<String> { |
| 42 | let choice = Select::new(prompt, choices) |
no outgoing calls
no test coverage detected