Struct app::Opt
[−]
[src]
pub struct Opt<'app> { /* fields omitted */ }
Option
Methods
impl<'app> Opt<'app>
[src]
fn new<'s: 'app, V>(name: &'app str, value: V) -> Self where
V: OptValueParse<'app>,
[src]
V: OptValueParse<'app>,
name and value, App
will maintain the value(&mut T
).
for example,
follows's charset is
Opt
's Nameh, v and cs is
Opt
's shorthelp, version and charset is
Opt
's longhelp is
Opt
's help message
--charset charset,-cs charset sets the charset Zipcs using
--help,-h show the help message
--version,-v show the version message
fn sort_key(self, sort_key: &'app str) -> Self
[src]
Default is Opt
's name
fn optional(self) -> Self
[src]
set Opt
s optional as true
(default is false
)(override OptValueParse
's default
and check
).
App
will will not check it's value if the Opt
not occurs and create help message without default's value if it is true
.
fn short(self, short: char) -> Self
[src]
short
fn long(self, long: &'app str) -> Self
[src]
long
fn help(self, help: &'app str) -> Self
[src]
help message