Struct clargs::ParsedArgs [−][src]
pub struct ParsedArgs { /* fields omitted */ }
Contains an argument list in parsed format.
Methods
impl ParsedArgs
[src]
impl ParsedArgs
pub fn name(&self) -> &str
[src]
pub fn name(&self) -> &str
Returns a reference to the first argument.
pub fn has_flag(&self, name: &str) -> bool
[src]
pub fn has_flag(&self, name: &str) -> bool
Returns true
if the specified flag was in the argument list.
pub fn get_param(&self, name: &str) -> Option<&str>
[src]
pub fn get_param(&self, name: &str) -> Option<&str>
Returns the value that is associated with the specified parameter.
pub fn get_param_as<T: FromStr>(&self, name: &str) -> Option<Result<T, T::Err>>
[src]
pub fn get_param_as<T: FromStr>(&self, name: &str) -> Option<Result<T, T::Err>>
Returns the value that is associated with the specified parameter parsed to the specified type.
pub fn unnamed_params(&self) -> &Vec<String>
[src]
pub fn unnamed_params(&self) -> &Vec<String>
Returns a reference to the vector of unnamed parameters.
pub fn get_subcommand(&self) -> Option<&str>
[src]
pub fn get_subcommand(&self) -> Option<&str>
Returns a reference to the name of the subcommand that is being invoked.
pub fn subcommand_args(&self) -> &Vec<String>
[src]
pub fn subcommand_args(&self) -> &Vec<String>
Returns a reference to the vector that holds the arguments for the subcommand which is being invoked.
Auto Trait Implementations
impl Send for ParsedArgs
impl Send for ParsedArgs
impl Sync for ParsedArgs
impl Sync for ParsedArgs