title: How to use StructOpt to parse an argument into a Vec without it being treated as multiple arguments?
body: <p>I have this code:</p>
  
  <pre><code>#[derive(StructOpt)]
  pub struct Opt {
      /// Data stream to send to the device
      #[structopt(help = "Data to send", parse(try_from_str = "parse_hex"))]
      data: Vec&lt;u8&gt;,
  }
  
  fn parse_hex(s: &amp;str) -&gt; Result&lt;u8, ParseIntError&gt; {
      u8::from_str_radix(s, 16)
  }
  </code></pre>
  
  <p>This works for <code>myexe AA BB</code>, but I need to take <code>myexe AABB</code> as input.</p>
  
  <p>Is there a way to pass a custom parser to <code>structopt</code> to parse <code>AABB</code> into a <code>Vec&lt;u8&gt;</code>? I need to parse only the second form (no space).</p>
  
  <p>I know I can do it in 2 steps (storing into a <code>String</code> in the struct then parse it, but I like the idea that my <code>Opt</code> has the final type for everything.</p>
  
  <p>I tried a parser like this:</p>
  
  <pre><code>fn parse_hex_string(s: &amp;str) -&gt; Result&lt;Vec&lt;u8&gt;, ParseIntError&gt;
  </code></pre>
  
  <p>The <code>StructOpt</code> macro panics about type mismatches because it seems to produce a <code>Vec&lt;Vec&lt;u8&gt;&gt;</code>.</p>