Crate term_basics_linux

Source
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§

InputList
A struct that holds inputs available for the user to scroll through.

Enums§

PrintChar
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.