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§
- arrow
- braille
- chess
- circle
- emoji
- error
- line
- math
- rbox
- 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.
- star
- triangle
Enums§
- Attribute
- Represents text attributes for styling.
- Color
- Represents the available colors for text and background.
Functions§
- clear_
line - Clears the entire line.
- clear_
screen - Clears the entire screen and moves the cursor to the top-left corner.
- clear_
to_ line_ end - Clears from the cursor to the end of the line.
- clear_
to_ line_ start - Clears from the cursor to the start of the line.
- clear_
to_ screen_ end - Clears from the cursor to the end of the screen.
- clear_
to_ screen_ start - Clears from the cursor to the start of the screen.
- get_
viewport - Gets the current viewport size.
- hide_
cursor - Hides the cursor.
- move_
cursor_ to - Moves the cursor to the specified position in the terminal.
- Writes the given text to the standard output and flushes the buffer.
- println
- Writes the given text to the standard output, followed by a newline, and flushes the buffer.
- put_
char - Writes a single character to the standard output and flushes the buffer.
- read_
key - Reads a key press from the standard input.
- read_
line - Reads a line from the standard input, trimming whitespace.
- reset_
attributes - Resets all text attributes to their default values.
- reset_
color - Resets both the foreground and background colors to their default values.
- restore_
cursor_ location - Restores the cursor to the previously saved location.
- save_
cursor_ location - Saves the current cursor location.
- set_
attribute - Sets the specified text attribute for subsequent text output.
- set_
background_ color - Sets the background color for subsequent text output in the terminal.
- set_
foreground_ color - Sets the foreground color for subsequent text output in the terminal.
- set_
viewport - Sets the viewport size.
- show_
cursor - Makes the cursor visible.
- wait_
for_ micros - Waits for the specified number of microseconds.
- wait_
for_ millis - Waits for the specified number of milliseconds.
- wait_
for_ seconds - Waits for the specified number of seconds.