Skip to main content

Module prompt

Module prompt 

Source
Available on crate feature prompt only.
Expand description

Interactive prompt helpers wrapping the inquire crate.

Thin typed wrappers for prompting integers, secrets, passwords, free text, booleans and a choice from a list, each returning a PromptResult.

Enums§

PromptError
Error raised when a prompt fails or is cancelled.

Functions§

bool
Prompts for a yes/no confirmation, with a default.
item
Prompts for one item chosen from a list, with an optional default selection.
items
Prompts for several items chosen from a list (a multi-select), with the given item indices selected by default.
password
Prompts for a masked password with a confirmation prompt.
secret
Prompts for a masked secret without confirmation.
some_secret
Prompts for a masked secret, returning None when skipped.
some_text
Prompts for free text, returning None when skipped.
text
Prompts for free text, with an optional default.
u16
Prompts for a u16 integer, with an optional default.
usize
Prompts for a usize integer, with an optional default.

Type Aliases§

PromptResult
Result of a prompt helper.