color_output/text/struct.rs
1use crate::*;
2
3/// Configurable text display with color, background and style options.
4///
5/// Used for building formatted console output with various display attributes.
6#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7pub struct Text<'a> {
8 /// The actual text content.
9 pub text: &'a str,
10 /// The color of the text.
11 pub color: ColorType,
12 /// The background color of the text.
13 pub bg_color: ColorType,
14 /// Whether the text should be bold.
15 pub bold: bool,
16 /// Whether to add newline after the text
17 pub endl: bool,
18}