ltpp_output

Function output

source
pub fn output(output: Output<'_>)
Expand description

Output

Official Documentation

§Parameters

  • Output: The output struct

§Code Example

§Using the Struct

§Using the output Function

use ltpp_output::*;
output(Output {
    text: "test_output_struct",
    text_color: Some(ColorType::Use(Color::Default)),
    text_bg_color: Some(ColorType::Color256(0x000000)),
    show_time: Some(true),
    show_code_location: Some(true),
    time_text_color: Some(ColorType::Rgb(255, 255, 255)),
    time_bg_color: Some(ColorType::Use(Color::Yellow)),
    code_location_text_color: Some(ColorType::Color256(0xffffff)),
    code_location_bg_color: Some(ColorType::Use(Color::Yellow)),
    split: Some(" => "),
    split_color: Some(ColorType::Use(Color::Cyan)),
    split_bg_color: Some(ColorType::Use(Color::Yellow)),
    ..Default::default()
});

§Using the Constructor

§Using the output Function

use ltpp_output::*;
output(
    OutputBuilder::new()
        .set_text("test_output_builder")
        .set_text_color(ColorType::Color256(0xffffff))
        .set_time_text_color(ColorType::Rgb(255, 200, 255))
        .set_code_location_text_color(ColorType::Use(Color::Yellow))
        .set_text_blod(true)
        .set_time_text_blod(true)
        .set_code_location_text_blod(true)
        .set_show_time(true)
        .set_show_code_location(true)
        .build()
);