Console Utility Library
A simple Rust library for console-based user input, option selection and more.
Input Function
The input
function reads user input from the console. It prompts the user with a message, reads a line of input, and returns an Option<T>
.
Usage
use input;
Select Function
The select
function allows the user to interactively select options from a list. It uses arrow keys or 'w' and 's' keys for navigation, spacebar for selection, and Enter to confirm. It returns an Option<Vec<bool>>
indicating which options were selected.
Usage
use select;
Spinner Function
The spinner function creates a console-based spinner animation, offering a visually appealing way to indicate ongoing processes.
Usage
use ;
Reveal Function
Displays a string gradually, revealing one character at a time with a specified time interval between each character.
Usage
use reveal;
Clear Line Function
Clears the current line in the console.
This function uses ANSI escape codes to clear the entire line and move the cursor to the beginning of the line.
Usage
use clear_line;
For more detailed documentation, please refer to the generated Rust Docs.