Crate rpian_terminal
source ·Expand description
rpian-terminal: A Rust library for terminal manipulation and drawing
This library provides a set of functions for manipulating the terminal, including cursor movement, color settings, and drawing various shapes.
Re-exports§
pub use line::Line;
pub use line::Direction;
pub use line::LineStyle;
pub use rbox::BoxStyle;
pub use rbox::ShadeStyle;
pub use circle::CircleSymbol;
Modules§
- This module provides functionality for drawing various types of boxes and lines in a terminal environment. It includes enums for different box styles, line styles, and shading options, as well as functions to convert these enum variants to their corresponding Unicode characters.
Enums§
- Represents text attributes for styling.
- Represents the available colors for text and background.
Functions§
- Clears the entire line.
- Clears the entire screen and moves the cursor to the top-left corner.
- Clears from the cursor to the end of the line.
- Clears from the cursor to the start of the line.
- Clears from the cursor to the end of the screen.
- Clears from the cursor to the start of the screen.
- Gets the current viewport size.
- Hides the cursor.
- Moves the cursor to the specified position in the terminal.
- Writes the given text to the standard output and flushes the buffer.
- Writes the given text to the standard output, followed by a newline, and flushes the buffer.
- Writes a single character to the standard output and flushes the buffer.
- Reads a key press from the standard input.
- Reads a line from the standard input, trimming whitespace.
- Resets all text attributes to their default values.
- Resets both the foreground and background colors to their default values.
- Restores the cursor to the previously saved location.
- Saves the current cursor location.
- Sets the specified text attribute for subsequent text output.
- Sets the background color for subsequent text output in the terminal.
- Sets the foreground color for subsequent text output in the terminal.
- Sets the viewport size.
- Makes the cursor visible.
- Waits for the specified number of microseconds.
- Waits for the specified number of milliseconds.
- Waits for the specified number of seconds.