Expand description
§Terminal Text Styler
If you are building a command-line tool with Rust, you may find it useful to highlight output in a style to make it stand out. Doing so, simply means wrapping your text in the necessary ANSI escape codes.
Structs§
- Styled
Terminal Text - Holds and displays text that will print with the specified color in a terminal.
- Terminal
Style - Stores a custom style for terminal text. This creates the escape command needed to change terminal text color. ANSI Escape Codes
Enums§
- ANSI
Background Color - ANSI Escape codes for text background color. ANSI Escape Codes
- ANSI
Foreground Color - ANSI Escape codes for text foreground color. ANSI Escape Codes
- SGREffect
- SGR (Select Graphic Rendition) sets display attributes. ANSI Escape Codes
Traits§
- Coded
- Describes anything that has a integer code
Functions§
- highlight
- Highlights the given text in the requested terminal color, (defaulting to bright yellow).
- highlight_
black - highlight_
blue - highlight_
bright_ black - highlight_
bright_ blue - highlight_
bright_ cyan - highlight_
bright_ green - highlight_
bright_ magenta - highlight_
bright_ red - highlight_
bright_ white - highlight_
bright_ yellow - highlight_
cyan - highlight_
green - highlight_
magenta - highlight_
red - highlight_
white - highlight_
yellow