text_prompt

Function text_prompt 

Source
pub fn text_prompt(message: &str) -> Result<Option<String>, InquireError>
Expand description

Displays a text input prompt with the given message, allowing cancellation.

Wraps [inquire::Text] with minimal rendering and cancellation handling.

ยงErrors

  • Rendering the prompt or terminal interaction inside [inquire] fails.
  • Collecting the user input fails for any reason reported by [Text].