Struct github_templates::Cli [−][src]
pub struct Cli { /* fields omitted */ }Command line parser.
Methods
impl Cli[src]
impl Clipub 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.
pub fn name(&self) -> Result<String>[src]
pub fn name(&self) -> Result<String>Access the directory name.
Trait Implementations
impl Debug for Cli[src]
impl Debug for Clifn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl StructOpt for Cli[src]
impl StructOpt for Clifn 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) -> SelfCreates 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() -> SelfGets 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