Crate structopt_flags[−][src]
structopt-flags
is a collection of reusable CLI flags and options
based on structopt
extern crate structopt_flags; #[macro_use] extern crate structopt; use structopt::StructOpt; use structopt_flags::LogLevel; // to access get_log_level #[derive(Debug, StructOpt)] #[structopt(name = "verbose", about = "An example using verbose flag")] struct Opt { #[structopt(flatten)] verbose: structopt_flags::Verbose, } fn main() { let opt = Opt::from_args(); let log_level_filter = opt.verbose.get_level_filter(); }
Structs
QuietVerbose |
This struct implements the |
SimpleVerbose |
This struct implements the |
Verbose |
This struct provides the |
Enums
Level |
An enum representing the available verbosity levels of the logger. |
LevelFilter |
An enum representing the available verbosity level filters of the logger. |
Traits
LogLevel |
This trait is designed to provide a log level compatible with the Log crates |