pub struct Form { /* private fields */ }Expand description
A TTY-based form with multiple steps and inputs.
Examples
use tty_form::{
Form,
step::{Step, CompoundStep, TextBlockStep},
control::{Control, TextInput},
};
let mut form = Form::new();
let mut name_step = CompoundStep::new();
TextInput::new("Enter a name:", false).add_to(&mut name_step);
name_step.add_to(&mut form);
TextBlockStep::new("Enter a description of this person:").add_to(&mut form);
let submission = form.execute(&mut interface, &mut stdin)?;Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Form
impl !Send for Form
impl !Sync for Form
impl Unpin for Form
impl !UnwindSafe for Form
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more