macro_rules! output_macro {
($($output:expr),*) => { ... };
}
Expand description
Output macro
§Parameters
Output
: The output struct
§Code Example
§Using the Struct
use color_output::*;
output_macro!(Output {
text: "test_proc_macro",
color: ColorType::default(),
bg_color: ColorType::Use(Color::Yellow),
endl: true,
..Default::default()
});
§Using the Constructor
use color_output::*;
output_macro!(OutputBuilder::new()
.text("test_output_builder")
.color(ColorType::Use(Color::Cyan))
.blod(true)
.endl(true)
.build());
§Multiple Inputs
use color_output::*;
output_macro!(
Output {
text: "test_proc_macro",
color: ColorType::default(),
bg_color: ColorType::Use(Color::Yellow),
endl: true,
..Default::default()
},
OutputBuilder::new()
.text("test_output_builder1")
.color(ColorType::Color256(0xffffff))
.blod(true)
.endl(true)
.build(),
OutputBuilder::new()
.text("test_output_builder2")
.color(ColorType::Color256(0xffffff))
.blod(true)
.endl(true)
.build()
);