#output #macro #termcolor

termcolor_output

Interface crate for styled output to termcolor through macro

4 releases (1 stable)

1.0.1 Oct 23, 2019
1.0.0-rc.3 Oct 20, 2019
1.0.0-rc.2 Oct 19, 2019
1.0.0-rc.1 Oct 18, 2019

#722 in Rust patterns

Download history 6628/week @ 2022-08-17 5867/week @ 2022-08-24 5836/week @ 2022-08-31 7045/week @ 2022-09-07 7809/week @ 2022-09-14 7402/week @ 2022-09-21 6127/week @ 2022-09-28 6348/week @ 2022-10-05 8939/week @ 2022-10-12 8213/week @ 2022-10-19 9206/week @ 2022-10-26 7586/week @ 2022-11-02 9624/week @ 2022-11-09 8910/week @ 2022-11-16 7533/week @ 2022-11-23 5842/week @ 2022-11-30

33,939 downloads per month
Used in 5 crates (3 directly)

MIT license

8KB


lib.rs:

Wrapper crate for termcolor_output_impl procedural macro.

The reason for this code to be split into two crates is simple: we want to make this functionality available on stable. In fact, this dual-crate system is simply the manual implementation of the code generated by proc_macro_hack.

What is it

The termcolor crate is a cross-platform implementation for the different console APIs, abstracting away both Linux terminals and Windows consoles. It has, however, a but cumbersome API itself (only a bit though), since for formatting-heavy parts we have to litter our code with explicit styling commands. This crate allows to abstract these things away, providing the interface similar to the standard write! macro.

Dependencies

~92KB