pub struct OutputBuilder<'a> {
pub output: Output<'a>,
}
Expand description
OutputBuilder struct
§Code Example
§Using the OutputBuilder
§Using the output Function
use ltpp_output::*;
output(
OutputBuilder::new_from(Output::default())
.set_text("test_output_builder")
.set_text_color(ColorType::Color256(0xffffff))
.set_text_bg_color(ColorType::Color256(0xffffff))
.set_split_bg_color(ColorType::Color256(0xffffff))
.set_time_text_color(ColorType::Rgb(255, 200, 255))
.set_text_blod(true)
.set_time_text_blod(true)
.set_show_time(true)
.set_endl(true)
.build(),
);
§Using the output Method
use ltpp_output::*;
OutputBuilder::new()
.set_text("test_output_builder_output")
.set_text_bg_color(ColorType::Color256(0xffffff))
.set_text_color(ColorType::Color256(0xffffff))
.set_time_text_color(ColorType::Rgb(255, 200, 255))
.set_text_blod(true)
.set_time_text_blod(true)
.set_show_time(true)
.set_endl(true)
.build()
.output();
Fields§
§output: Output<'a>
Implementations§
Source§impl<'a> OutputBuilder<'a>
impl<'a> OutputBuilder<'a>
Sourcepub fn set_text_color(&mut self, text_color: ColorType) -> &mut Self
pub fn set_text_color(&mut self, text_color: ColorType) -> &mut Self
Sourcepub fn set_text_bg_color(&mut self, text_bg_color: ColorType) -> &mut Self
pub fn set_text_bg_color(&mut self, text_bg_color: ColorType) -> &mut Self
Sourcepub fn set_text_blod(&mut self, text_blod: bool) -> &mut Self
pub fn set_text_blod(&mut self, text_blod: bool) -> &mut Self
Sourcepub fn set_show_time(&mut self, show_time: bool) -> &mut Self
pub fn set_show_time(&mut self, show_time: bool) -> &mut Self
Sourcepub fn set_time_text_color(&mut self, time_text_color: ColorType) -> &mut Self
pub fn set_time_text_color(&mut self, time_text_color: ColorType) -> &mut Self
Sourcepub fn set_time_bg_color(&mut self, time_bg_color: ColorType) -> &mut Self
pub fn set_time_bg_color(&mut self, time_bg_color: ColorType) -> &mut Self
Sourcepub fn set_time_text_blod(&mut self, time_text_blod: bool) -> &mut Self
pub fn set_time_text_blod(&mut self, time_text_blod: bool) -> &mut Self
Sourcepub fn set_split_text(&mut self, split: &'a str) -> &mut Self
pub fn set_split_text(&mut self, split: &'a str) -> &mut Self
Sourcepub fn set_split_text_color(&mut self, split_color: ColorType) -> &mut Self
pub fn set_split_text_color(&mut self, split_color: ColorType) -> &mut Self
Sourcepub fn set_split_bg_color(&mut self, split_bg_color: ColorType) -> &mut Self
pub fn set_split_bg_color(&mut self, split_bg_color: ColorType) -> &mut Self
Sourcepub fn set_split_text_blod(&mut self, split_text_blod: bool) -> &mut Self
pub fn set_split_text_blod(&mut self, split_text_blod: bool) -> &mut Self
Auto Trait Implementations§
impl<'a> Freeze for OutputBuilder<'a>
impl<'a> RefUnwindSafe for OutputBuilder<'a>
impl<'a> Send for OutputBuilder<'a>
impl<'a> Sync for OutputBuilder<'a>
impl<'a> Unpin for OutputBuilder<'a>
impl<'a> UnwindSafe for OutputBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more