Struct crossgen::Cli [−][src]
pub struct Cli { /* fields omitted */ }
Command line parser.
Methods
impl Cli
[src]
impl Cli
pub fn log(&self, name: &str) -> Result<()>
[src]
pub fn log(&self, name: &str) -> Result<()>
Initialize a logger.
pub fn dir(&self) -> Result<PathBuf>
[src]
pub fn dir(&self) -> Result<PathBuf>
Access the dir. Checks if it's a directory on disk.
TODO: read the cargo.toml
instead.
pub fn name(&self) -> Result<String>
[src]
pub fn name(&self) -> Result<String>
Access the directory name.
pub fn lib(&self) -> bool
[src]
pub fn lib(&self) -> bool
Access the lib flag.
Trait Implementations
impl Debug for Cli
[src]
impl Debug for Cli
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl StructOpt for Cli
[src]
impl StructOpt for Cli
fn clap<'a, 'b>() -> App<'a, 'b>
[src]
fn clap<'a, 'b>() -> App<'a, 'b>
Returns the corresponding clap::App
.
fn from_clap(matches: &ArgMatches) -> Self
[src]
fn from_clap(matches: &ArgMatches) -> Self
Creates the struct from clap::ArgMatches
. It cannot fail with a parameter generated by clap
by construction. Read more
fn from_args() -> Self
[src]
fn from_args() -> Self
Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
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
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more