title: How to prepend a slice to a Vec
body: <p>I was expecting a <code>Vec::insert_slice(index, slice)</code> method — a solution for strings (<a href="https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str" rel="noreferrer"><code>String::insert_str()</code></a>) does exist. </p>
  
  <p>I know about <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.insert" rel="noreferrer"><code>Vec::insert()</code></a>, but that inserts only one element at a time, not a slice. Alternatively, when the prepended slice is a <code>Vec</code> one can append to it instead, but this does not generalize. The idiomatic solution probably uses <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.splice" rel="noreferrer"><code>Vec::splice()</code></a>, but using iterators as in the example makes me scratch my head. </p>
  
  <p>Secondly, the whole concept of prepending has seemingly been exorcised from the <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html" rel="noreferrer">docs</a>. There isn't a single mention. I would appreciate comments as to why. Note that relatively obscure methods like <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.swap_remove" rel="noreferrer"><code>Vec::swap_remove()</code></a> do exist. </p>
  
  <p>My typical use case consists of indexed byte strings. </p>