Struct clap_verbosity_flag::Verbosity[][src]

pub struct Verbosity { /* fields omitted */ }

Easily add a --verbose flag to CLIs using Structopt

Examples

extern crate clap_verbosity_flag;
#[macro_use] extern crate structopt;

use structopt::StructOpt;
use clap_verbosity_flag::Verbosity;

/// Le CLI
#[derive(Debug, StructOpt)]
struct Cli {
    #[structopt(flatten)]
    verbose: Verbosity,
}

Methods

impl Verbosity
[src]

Get the log level.

Initialize env_logger and set the log level for the given package.

All other modules default to printing warnings.

Trait Implementations

impl StructOpt for Verbosity
[src]

Returns the corresponding clap::App.

Creates the struct from clap::ArgMatches. It cannot fail with a parameter generated by clap by construction. Read more

Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Read more

impl Debug for Verbosity
[src]

Formats the value using the given formatter. Read more

impl Clone for Verbosity
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Verbosity
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Verbosity

impl Sync for Verbosity