Function term_basics_linux::input_field_scrollable [−][src]
pub fn input_field_scrollable(history: &mut InputHistory) -> StringExpand description
Lets the user type text. It returns the string after the user presses ‘enter’.
It supports all functions input_field() supports.
It also supports scrolling through the history of earlier typed strings with
the ‘up’ and ‘down’ arrow keys.
Example
use term_basics_linux as tbl;
let mut history = tbl::InputHistory::new(100);
let input0 = tbl::input_field_scrollable(&mut history);
println!("You typed: {}", input0);
let input1 = tbl::input_field_scrollable(&mut history);
println!("You typed: {}", input1);