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

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

Enums

  • 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

  • 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.
  • Reads a char from keyboard input. Returns the first byte, does not wait for the user to press enter.
  • 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.
  • Small helper to parse string to a value
  • Prints the result of getch as u8, infinite loop. Can be used for testing.