[−][src]Function menu::argument_finder
pub fn argument_finder<'a, T>(
item: &'a Item<'a, T>,
argument_list: &'a [&'a str],
name_to_find: &'a str
) -> Result<Option<&'a str>, ()>
Looks for the named parameter in the parameter list of the item, then finds the correct argument.
- Returns
Ok(None)ifparameter_namegives an optional or named parameter and that argument was not given. - Returns
Ok(arg)if the argument corresponding toparameter_namewas found.argis the empty string if the parameter wasParameter::Named(and hence doesn't take a value). - Returns
Err(())ifparameter_namewas not initem.parameter_listoritemwasn't an Item::Callback