pub struct Opts {
pub current_dir: Option<PathBuf>,
pub verbose: u32,
pub quiet: bool,
pub cmd: Commands,
}
Fields§
§current_dir: Option<PathBuf>
The current directory where to run all commands
verbose: u32
A level of verbosity, and can be used multiple times
quiet: bool
No output printed to stdout
cmd: Commands
Implementations§
Source§impl Opts
impl Opts
pub fn get_verbosity(&self) -> Verbosity
pub fn get_current_dir(&self) -> PathBuf
Trait Implementations§
Source§impl Clap for Opts
impl Clap for Opts
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§impl FromArgMatches for Opts
impl FromArgMatches for Opts
Source§fn from_arg_matches(matches: &ArgMatches) -> Self
fn from_arg_matches(matches: &ArgMatches) -> Self
It’s common to have an “application context” struct (sometimes called
config) that represents all the normalized values after being processed by
the CLI. Read more
Auto Trait Implementations§
impl Freeze for Opts
impl RefUnwindSafe for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnwindSafe for Opts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more