Macro farve::efarve

source ·
macro_rules! efarve {
    ($func:ident, $prefix:expr, $bracket_brightness:expr) => { ... };
    ($func:ident, $prefix:expr) => { ... };
    ($func:ident) => { ... };
}
Expand description

Just like farve!, but prints to stderr instead of stdout. Creates an eprintln with a prefix and brackets (0-2 brightness).

$func - the name of the function, it should not be wrapped in quotes. $prefix - the prefix, it should be wrapped in quotes (default: function name). $bracket_brightness - 0 | 1 | 2; brightness of the brackets (default: 0).

Examples

use owo_colors::OwoColorize;
use farve::efarve;

efarve!(warn, "WARN".yellow().underline(), 1);
efarve!(skip, "skip".bright_black().italic());