pub struct TextInput { /* private fields */ }
Expand description

A single-line text field input. May be used as an evaluation for dependent form elements.

Examples

use tty_form::{
    step::CompoundStep,
    control::{Control, TextInput},
};

let mut step = CompoundStep::new();
TextInput::new("Enter your name:", false).add_to(&mut step);

Implementations

Create a new text input control with the specified prompt and casing-rules.

Update this input’s prompt text.

Specify whether this input should force its value to be lowercase.

Sets the dependency evaluation which other form elements can react to.

Trait Implementations

Whether this control is a focusable input.
Updates the control’s state from the given input event.
This control’s descriptive help text, if available.
This control’s rendered contents and an optional offset for the cursor.
This control’s drawer contents, if available.
This control’s dependency evaluation which other controls may react to.
This control’s dependency which it may react to.
Perform an evaluation against this control’s current state.
Finish configuration and add this control to the specified form step.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.