use termcolor::Ansi; use termcolor_output::colored; fn main() { let mut w: Ansi> = Ansi::new(vec![]); match colored!(w, "Text: {}, after it - some more", "Text") { Ok(_) => print!("{}", String::from_utf8_lossy(&w.into_inner())), Err(_) => {} }; }