Expand description
Blocking, inline terminal prompt runtime styled with urushi.
Form::run opens and owns a short-lived default terminal session, while
Form::run_with_terminal runs on a caller-owned connection after an
explicit theme has been selected. Both block until the form is submitted,
cancelled, or terminal I/O fails. Neither queries the terminal background
or changes the supplied theme. The crate exposes the form runtime (Form,
FormBuilder, PromptStart, InlineResizePolicy, Group,
FormOutcome, RunError) together with the Input, Select, and
Confirm field controls, and re-exports urushi for styling.
Re-exports§
pub use urushi;
Structs§
- Confirm
- A yes-or-no field with an optional default answer.
- Confirm
Answer - A submitted confirmation value and how it was chosen.
- Field
Key - Form
- A blocking, ordered collection of prompt groups.
- Form
Builder - A builder for a blocking prompt form.
- Form
Values - Values made available only after a form is submitted.
- Group
- A group of fields executed in builder insertion order.
- Group
Builder - A builder for a non-empty prompt group.
- Input
- A one-line text input field.
- Select
- A field that selects one value from a non-empty list of options.
- Select
Option - A labelled value offered by
Select. - Validation
Error - An error reported by a synchronous input validator.
Enums§
- Confirm
Source - The provenance of a submitted confirmation value.
- Field
Config Error - A field-specific configuration error reserved for concrete field controls.
- Form
Build Error - An invalid top-level form configuration.
- Form
Outcome - The terminal-visible outcome of a completed form run.
- Group
Build Error - An invalid group configuration.
- Inline
Resize Policy - What an inline prompt does when its terminal viewport is resized.
- IoOperation
- The I/O boundary at which a prompt run failed.
- Prompt
Start - Where a prompt establishes the left edge of its owned region.
- RunError
- An error that prevents a form from completing normally.
Traits§
- Field
- A crate-provided prompt field.
Type Aliases§
- Validator
- A synchronous validation rule for a prompt value.