title: How can I find a subsequence in a &[u8] slice?
body: <p>I have a <code>&amp;[u8]</code> slice over a binary buffer. I need to parse it, but a lot of the methods that I would like to use (such as <code>str::find</code>) don't seem to be available on slices.</p>
  
  <p>I've seen that I can covert both by buffer slice and my pattern to <code>str</code> by using <code>from_utf8_unchecked()</code> but that seems a little dangerous (and also really hacky).</p>
  
  <p>How can I find a subsequence in this slice? I actually need the index of the pattern, not just a slice view of the parts, so I don't think <code>split</code> will work.</p>