pub fn parse_verbosity(in_s: &str) -> Result<usize, String>Expand description
Parse verbosity like “error”, “warn”, …
For use with clap. E.g.:
use rustradio::parse_verbosity;
#[derive(clap::Parser)]
struct Opt {
#[arg(long, value_parser=parse_verbosity)]
verbose: usize,
}§Errors
If the log level is not one of the known strings.