from_debug

Function from_debug 

Source
pub fn from_debug<T: Debug>(word: T) -> u8
Expand description

auto-colorize the underlying bytes of given text with the color determined by from_bytes

Examples found in repository?
examples/demo.rs (line 22)
5fn main() {
6    let args = get_argv();
7    let args = if args.is_empty() {
8        vec![format!("<missing argument>")]
9    } else {
10        args
11    };
12    for arg in args
13        .clone()
14        .into_iter()
15        .enumerate()
16        .filter(|(i, _)| *i > 0)
17        .map(|(_, c)| String::from(c))
18    {
19        let fg = from_display(&arg) as usize;
20        step!(fg = fg, format!("{arg}"));
21    }
22    let fg = from_debug(&args) as usize;
23    step_dbg!(fg = fg, args);
24}