# clap::values_t! [−] [src]

    macro_rules! values_t {
        ($m:ident, $v:expr, $t:ty) => { ... };
        ($m:ident.values_of($v:expr), $t:ty) => { ... };
    }

Convenience macro getting a typed value `Vec<T>` where `T` implements `std::str::FromStr` This macro returns a `clap::Result<Vec<T>>` (`Result<Vec<T>, clap::Error>`) which allows you as the developer to decide what you'd like to do on a failed parse.

# Examples

    let matches = App::new("myapp")
                  .arg_from_usage("[seq]... 'A sequence of pos whole nums, i.e. 20 45'")
                  .get_matches();

    let vals = values_t!(matches.values_of("seq"), u32).unwrap_or_else(|e| e.exit());
    for v in &vals {
        println!("{} + 2: {}", v, v + 2);
    }

    let vals = values_t!(matches, "seq", u32).unwrap_or_else(|e| e.exit());
    for v in &vals {
        println!("{} + 2: {}", v, v + 2);
    }

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)