Expand description
§Example
use term_basics_linux as tbl;
print!("typ your name: ");
let name = tbl::input_field_simple(true);
print!("Your name: {name}");
Structs§
- Input
List - A struct that holds inputs available for the user to scroll through.
Enums§
- Print
Char - What kind of character the input field will print.
Copy
will just print what the user types in.Substitute(char)
will print that character.None
will not print anything at all.
Functions§
- flush
- Flushes stdout. When you do print! or term-basics-linux equivalent, it will not print immediately. flush() will make sure everything is printed first, before you do something else. Input fields flush themselves before the query for input.
- getch
- Reads a char from keyboard input. Returns the first byte, does not wait for the user to press enter.
- input_
field - input_
field_ scrollable - input_
field_ simple - Prints a message to the user. The user can type its input next to the message on the same line. It will return the user input after the user pressed enter. It uses term_basics_linux::input_field and supports the same operations.
- string_
to_ bool - string_
to_ value - Small helper to parse string to a value
- test_
chars - Prints the result of getch as u8, infinite loop. Can be used for testing.