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

A multi-line text input step.

Examples

use tty_form::{
    Form,
    step::{Step, TextBlockStep},
};

let mut form = Form::new();

let mut step = TextBlockStep::new("Enter your story:");
step.set_max_line_length(100);
step.add_to(&mut form);

Implementations

Create a new, default text block step.

Set this text block’s top and bottom margins.

Set this text block step’s optional maximum line grapheme length.

Set whether this text block should trim trailing whitespace.

Trait Implementations

Perform any post-configuration initialization actions for this step.
Render this step at the specified position and return the height of the rendered content.
Handle the specified input event, optionally returning an instruction for the form.
Retrieve this step’s current help text.
Retrieve this step’s current drawer contents, if applicable.
Retrieves this step’s final WYSIWYG result.
Complete configuration and add this step to the form.

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.