#ansi #format #format-args #interpreting #macro #generics #procr-ansi-term

macro procr_ansi_format

Proc macro for format_args!/format! like functionality for ANSI related generics

1 unstable release

0.1.0 Oct 12, 2023

#8 in #format-args


Used in procr_ansi_term

MIT/Apache

60KB
1.5K SLoC

procr-ansi-term

Documentation

What is this crate useful for?

Styling data that will be eventually rendered by a terminal capable of interpreting ANSI style codes.

Should I use this crate?

Short answer: no. owo_colors does everything this crate does, but more rationally, and more effectively.

History

nu-ansi-term is used by tracing_subscriber (for what may be considered historical reasons), and was a copy of ansi_term but with Colour changed to Color and various colors added. procr-ansi-term, born in a time when I didn't know better, adds functionality to nu-ansi-term which allows ANSI formatting of format_args!, and also allows various ANSI strings/format args to be nested in styling, with a primitive parent-child inheritance of said styling.

Dependencies

~3.5–5MB
~96K SLoC