Enum app::OptTypo
[−]
[src]
pub enum OptTypo { Single, Ignored, Covered, Multiple(Option<usize>), }
OptionType
You should ignore OptTypo
if the Opt
is a flag(trait OptValueParse
: is_bool
).
Variants
Single
App
will exit if the Opt
occurs for the second time.
Ignored
App
will ignore all values of the Opt
except the first time.
Covered
Default
: App
will overwrite the previous value with a later value.
Multiple(Option<usize>)
App
will accumulate all values of the Opt
if the Opt
's value is Vec<T>
or &mut [T]
, otherwise it equal to Covered
(default).
The value is the length set for Vec<T>
or &[T]
, default is None
or the length of &mut [T]
.
Methods
impl OptTypo
[src]
fn is_single(&self) -> bool
[src]
fn is_ignored(&self) -> bool
[src]
fn is_covered(&self) -> bool
[src]
fn is_multiple(&self) -> bool
[src]
fn multiple_get(&self) -> Option<&usize>
[src]
If it not a OptTypo::Multiple(_)
, will panic
fn set_multiple(&mut self, len: Option<usize>)
[src]
Set it as OptTypo::Multiple(_)
Trait Implementations
impl Debug for OptTypo
[src]
impl Clone for OptTypo
[src]
fn clone(&self) -> OptTypo
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for OptTypo
[src]
fn eq(&self, __arg_0: &OptTypo) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &OptTypo) -> bool
[src]
This method tests for !=
.