title: Get indexes of all occurrences of a substring within a string
body: <p>If I wanted to get the index of the <strong>first</strong> occurrence of, say, substring <code>"foo"</code> within a string <code>"foo bar foo baz foo"</code>, I'd use:</p>
  
  <pre><code>fn main() {
      let my_string = String::from("foo bar foo baz foo");
      println!("{:?}", my_string.find("foo"));
  }
  </code></pre>
  
  <p>...which would give me <code>Some(0)</code>.</p>
  
  <p>However, I need to find indexes of <strong>all</strong> occurrences of a substring within a string.
  In this scenario, I'd need something like:</p>
  
  <pre><code>[0, 8, 16]
  </code></pre>
  
  <p>How can I do this idiomatically in Rust?</p>