Module dinglebit_terminal::style
source · [−]Expand description
Apply a style to terminal text using the “Set Graphics Mode” escape sequence.
The easiest way to use this is to use the style! macro.
use dinglebit_terminal::style;
fn main() {
let s = style!("{}, {}!", "Hello", "world")
.black()
.underline()
.to_string();
assert_eq!(s, "\x1b[30;4mHello, world!\x1b[0m");
}
Structs
A Stylized text that can be output to a terminal.