color-output 8.2.12

An atomic output library based on Rust that supports output functionalities through functions, builders, and other methods. It allows customization of text and background colors.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::*;

/// Represents a colored text output with formatting options.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Output<'a> {
    /// The text content to output.
    pub text: &'a str,
    /// The text color.
    pub color: ColorType,
    /// The background color.
    pub bg_color: ColorType,
    /// Whether the text should be bold.
    pub bold: bool,
    /// Whether to add a newline after the text.
    pub endl: bool,
}