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

    macro_rules! values_t_or_exit {
        ($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` or exiting upon error.

NOTE: This macro is for backwards compatibility sake. Prefer `values_t!(/* ... */).unwrap_or_else(|e| e.exit())`

# 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_or_exit!(matches.values_of("seq"), u32);
    for v in &vals {
        println!("{} + 2: {}", v, v + 2);
    }

    // type for example only
    let vals: Vec<u32> = values_t_or_exit!(matches, "seq", u32);
    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`)