Indexing vector by a 32-bit integer
<p>In Rust, vectors are indexed using <code>usize</code>, so when writing</p>

<pre><code>let my_vec: Vec&lt;String&gt; = vec!["Hello", "world"];
let index: u32 = 0;
println!("{}", my_vec[index]);
</code></pre>

<p>you get an error, as index is expected to be of type <code>usize</code>. I'm aware that this can be fixed by explicitly converting index to <code>usize</code>:</p>

<pre><code>my_vec[index as usize]
</code></pre>

<p>but this is tedious to write. Ideally I'd simply overload the <code>[]</code> operator by implementing</p>

<pre><code>impl&lt;T&gt; std::ops::Index&lt;u32&gt; for Vec&lt;T&gt; { ... }
</code></pre>

<p>but that's impossible as Rust prohibits this (as neither the trait nor struct are local). The only alternative that I can see is to create a wrapper class for <code>Vec</code>, but that would mean having to write lots of function wrappers as well. Is there any more elegant way to address this?</p>