[][src]Crate terminal_text_styler

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

StyledTerminalText

Holds and displays text that will print with the specified color in a terminal.

TerminalStyle

Stores a custom style for terminal text. This creates the escape command needed to change terminal text color. ANSI Escape Codes

Enums

ANSIBackgroundColor

ANSI Escape codes for text background color. ANSI Escape Codes

ANSIForegroundColor

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