color_output/output/struct.rs
1use crate::*;
2
3/// Output struct
4///
5/// [Official Documentation](https://docs.ltpp.vip/COLOR-OUTPUT/),
6///
7/// # Code Example
8///
9/// ## Using the Struct
10///
11/// ### Using the output Function
12///
13/// ```rust
14/// use color_output::*;
15/// output(Output {
16/// text: "test_output_struct",
17/// color: ColorType::Use(Color::Default),
18/// bg_color: ColorType::Color256(0x000000),
19/// endl: true,
20/// ..Default::default()
21/// });
22/// ```
23///
24/// ### Using the output Method
25///
26/// ```rust
27/// use color_output::*;
28/// Output {
29/// text: "test_output_struct_output",
30/// color: ColorType::Use(Color::Default),
31/// bg_color: ColorType::Use(Color::Blue),
32/// endl: true,
33/// ..Default::default()
34/// }
35/// .output();
36/// ```
37#[derive(Debug, Clone)]
38pub struct Output<'a> {
39 /// text
40 pub text: &'a str,
41 /// text color
42 pub color: ColorType,
43 /// Text background color
44 pub bg_color: ColorType,
45 /// Bold text
46 pub blod: bool,
47 /// endl
48 pub endl: bool,
49}