Crate cargo_lambda_interactive

Source

Modules§

autocompletion
Trait and structs used by prompts to provide autocompletion features.
command
error
Definitions of inquire’s error handling
formatter
Type aliases and default implementations for functions called as formatters of a given input.
list_option
Utilities used to wrap user selections in Select and MultiSelect prompts.
parser
Type aliases and default implementations for parsers called in prompts that need to parse user input, such as Confirm or CustomType.
progress
type_aliases
General type aliases.
ui
UI-related definitions for rendered content.
validator
Traits and structs used by prompts to validate user input before returning the values to their callers.

Macros§

length
Shorthand for the built-in ExactLengthValidator that checks whether the answer length is equal to the specified value.
max_length
Shorthand for the built-in MaxLengthValidator that checks whether the answer length is smaller than or equal to the specified threshold.
min_length
Shorthand for the built-in MinLengthValidator that checks whether the answer length is larger than or equal to the specified threshold.
parse_type
Built-in parser creator that checks whether the answer is able to be successfully parsed to a given type, such as f64. The given type must implement the FromStr trait.
required
Shorthand for the built-in ValueRequiredValidator that checks whether the answer is not empty.

Structs§

Confirm
Prompt to ask the user for simple yes/no questions, commonly known by asking the user displaying the (y/n) text.
CustomType
Generic prompt suitable for when you need to parse the user input into a specific type, for example an f64 or a rust_decimal, maybe even an uuid.
MultiSelect
Prompt suitable for when you need the user to select many options (including none if applicable) among a list of them.
Password
Prompt meant for secretive text inputs.
Select
Prompt suitable for when you need the user to select one option among many.
Text
Standard text prompt that returns the user string input.

Enums§

InquireError
Possible errors returned by inquire prompts.
PasswordDisplayMode
Display modes of the text input of a password prompt.

Traits§

Autocomplete
Mechanism to implement autocompletion features for text inputs. The Autocomplete trait has two provided methods: get_suggestions and get_completion.

Functions§

choose_option
is_stdin_tty
Check if STDIN is a TTY
is_stdout_tty
Check if STDOUT is a TTY
is_user_cancellation_error
set_global_render_config
Acquires a write lock to the global RenderConfig object and updates the inner value with the provided argument.

Type Aliases§

CustomUserError
Type alias to define errors that might be thrown by the library user on callbacks such as validators.