Crate cargo_lambda_interactive
source ·Modules
- Trait and structs used by prompts to provide autocompletion features.
- Definitions of
inquire’s error handling - Type aliases and default implementations for functions called as formatters of a given input.
- Utilities used to wrap user selections in Select and
MultiSelectprompts. - Type aliases and default implementations for parsers called in prompts that need to parse user input, such as Confirm or
CustomType. - General type aliases.
- UI-related definitions for rendered content.
- Traits and structs used by prompts to validate user input before returning the values to their callers.
Macros
- Shorthand for the built-in
ExactLengthValidatorthat checks whether the answer length is equal to the specified value. - Shorthand for the built-in
MaxLengthValidatorthat checks whether the answer length is smaller than or equal to the specified threshold. - Shorthand for the built-in
MinLengthValidatorthat checks whether the answer length is larger than or equal to the specified threshold. - 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. - Shorthand for the built-in
ValueRequiredValidatorthat checks whether the answer is not empty.
Structs
- Prompt to ask the user for simple yes/no questions, commonly known by asking the user displaying the
(y/n)text. - Generic prompt suitable for when you need to parse the user input into a specific type, for example an
f64or arust_decimal, maybe even anuuid. - Prompt suitable for when you need the user to select many options (including none if applicable) among a list of them.
- Prompt meant for secretive text inputs.
- Prompt suitable for when you need the user to select one option among many.
- Standard text prompt that returns the user string input.
Enums
- Possible errors returned by
inquireprompts. - Display modes of the text input of a password prompt.
Traits
- Mechanism to implement autocompletion features for text inputs. The
Autocompletetrait has two provided methods:get_suggestionsandget_completion.
Functions
- Check if STDIN is a TTY
- Check if STDOUT is a TTY
- Acquires a write lock to the global RenderConfig object and updates the inner value with the provided argument.
Type Aliases
- Type alias to define errors that might be thrown by the library user on callbacks such as validators.