Function get_many

Source
pub fn get_many<'a, T: Any + Clone + Send + Sync + 'static>(
    matches: &[&'a ArgMatches],
    id: &str,
) -> Flatten<IntoIter<ValuesRef<'a, T>>>
Expand description

Helper function for dealing with chains of ArgMatches while working in ActionCommand::action to find arguments which may have been spcified anywhere in the subcommand tree.

// my-program --my-arg alpha my-subcommand --my-arg beta
let arg = get_many::<String>(&matches, "my-arg");
assert_eq!(vec!["alpha", "beta"], arg.collect::<Vec<_>>());